Video processing method and electronic device
By flexibly controlling speaker volume and music playback in electronic devices, the problem of insufficient intelligence in video processing is solved, and clear separation of ambient sound and music is achieved during recording, thus improving the video sound quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2021-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, video processing lacks intelligence and cannot flexibly adapt to different processing methods for different scenarios, thus affecting the processing effect.
By enabling flexible control of speaker volume and music playback in electronic devices, combined with ambient sound acquisition and processing, it ensures that the speaker volume is not zero or zero during recording. After recording, ambient sound and music are played separately, or only music is played, to avoid ambient sound confusion.
It improves video processing, ensuring that ambient sounds and music during recording are not disrupted, and enhances the audio quality of the video.
Smart Images

Figure CN115484389B_ABST
Abstract
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. 202111437406.2, 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 can display 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 begins recording video content and captures first ambient sound through the microphone of the electronic device. During recording, the electronic device displays a first identifier, such as... Figure 3 In interface 303 shown in (b), "00:15" indicates the preset duration. During recording, the electronic device's speaker does not play the first music. However, it's important to clarify that the speaker not playing the first music is not because the speaker volume is muted; rather, the user has set the speaker volume to be greater than zero during recording—for example, the user has not muted the speaker. The electronic device automatically ends recording and displays the second interface in response to the preset recording duration being reached. Figure 8CThe interface 811 shown in (a) includes video content. When the video content is played on the second interface, the first ambient sound and the first music are played.
[0007] In summary, using the method of this application embodiment, if the electronic device's speaker is not playing the first music during recording, then the first ambient sound captured by the electronic device's microphone will not include 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 captured ambient sound, rather than directly removing the ambient sound, thereby improving the video's sound quality.
[0008] In one possible design of the first aspect, before starting video recording, the method further includes: the electronic device responding to a user's first preset operation on the electronic device, such as increasing the phone's volume, by setting the speaker volume to be greater than zero. Correspondingly, during recording, the user setting the speaker volume to be greater than zero includes: determining that the electronic device starts recording video content when the speaker volume is greater than zero, and during recording, the user setting the speaker volume to be greater than zero.
[0009] Therefore, by using the method of this embodiment, the electronic device can turn on the speaker sound according to the user's operation before starting video recording. This ensures that the speaker volume remains non-zero during the recording process.
[0010] In another possible design approach for the first aspect, the aforementioned first interface includes a second control, such as... Figure 3 (c) shows button 305 in interface 304. The second control includes a first state and a second state. The first state indicates that the electronic device is playing the first music, and the second state indicates that the electronic device is not playing the first music. For example, Figure 5 In the diagram (a), button 502 in interface 501 represents the second state. Figure 6 In the interface 601 shown in (a), button 602 is in the first state. The above-mentioned situation where the electronic device's speaker does not play the first music during recording includes: determining that the electronic device starts recording video content when the second control is in the second state, and during recording, the speaker does not play the first music.
[0011] Therefore, by using the method of this embodiment, the electronic device can switch between playing the first piece of music and not playing it before video recording. This allows for flexible switching of whether or not the first piece of music is played through the speaker.
[0012] In another possible design of the first aspect, the method further includes: determining that the electronic device starts recording video content when the second control is in the first state; during the recording process: the speaker plays first music, the microphone collects second ambient sound, and the electronic device displays a first indicator indicating a preset duration. In response to the recording duration reaching the preset duration, the electronic device automatically ends recording and displays a second interface, which includes the video content; wherein, when playing the video content on the second interface, the first music is played, but the second ambient sound is not played.
[0013] Therefore, by using the method of this embodiment, if the recording is switched to play the first music before recording begins, the speaker can play the first music during recording, and the second ambient sound captured by the microphone will include the playing first music. In this case, after recording ends, the electronic device can play only the first music and not the second ambient sound, thereby avoiding the impact of ambient sound disturbance on the video's sound quality.
[0014] In another possible design of the first aspect, before starting video recording, the method further includes: the electronic device, in response to a second preset operation by the user, such as muting the speaker, setting the speaker volume to zero. After setting the speaker volume to zero, the electronic device, in response to the first operation, starts recording video content. During recording: the microphone picks up a third ambient sound, the electronic device displays a first indicator indicating a preset duration, and the user sets the speaker volume to zero. The electronic device, in response to the recording duration reaching the preset duration, automatically ends recording and displays a second interface including the video content; wherein, when playing the video content on the second interface, the third ambient sound and the first music are played.
[0015] Therefore, by using the method of this embodiment, the electronic device can mute the speaker before video recording begins, based on the user's operation, ensuring the speaker volume remains zero during recording. Thus, during recording, the volume of the first music track is zero, preventing it from being played back into the environment, and the electronic device's microphone will not pick it up. In other words, the ambient sound captured by the electronic device does not include the first music track. In this case, after recording ends, the electronic device can simultaneously play the first music track and the third ambient sound track. This allows for the preservation of both ambient sound and the first music track without disrupting the captured ambient sound, rather than directly removing the ambient sound, thereby improving the video's audio quality.
[0016] In another possible design approach of the first aspect, the volume setting for the speaker mentioned above includes media volume. Generally, the speaker volume of an electronic device can include the volume of ringtones, media sounds, and notification sounds. The volume of the media sounds determines the volume of the music being played. Therefore, by setting the media volume, the volume of the first piece of music played by the speaker can be accurately controlled.
[0017] In another possible design of the first aspect, the method further includes: during recording, the electronic device displays a first prompt message in response to a preset change in the volume setting of the speaker by the user; wherein the preset change includes: a change from a volume greater than zero to a volume of zero, or a change from a volume of zero to a volume greater than zero; the first prompt message is used to indicate that the preset change will affect the final result.
[0018] Therefore, by employing the method of this embodiment, the electronic device can detect during recording that the user's speaker volume setting changes from zero to a non-zero value, or from a non-zero value to zero, and then prompt the user that this will affect the final video quality. This allows the user to be prompted to restore the previous setting, reducing the impact on the final video quality and improving its overall quality.
[0019] In another possible design of the first aspect, after displaying the second interface, the method further includes: the electronic device automatically playing video content on the second interface. Alternatively, the second interface includes a frame of video content and a third control, and the method further includes: the electronic device playing video content in response to a second operation by the user on the third control.
[0020] Therefore, by using the method of this embodiment, the electronic device can play the recorded video directly after recording or according to the user's operation. This makes it convenient to view the final result.
[0021] 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 options corresponding to multiple templates. Each template is used by the electronic device to add corresponding music to a recorded video. In response to a user's selection of a first option, the electronic device selects a first template, such as the "Hello Summer" template in interface 301. The first option is one of multiple options, corresponding to a first template, which is used by the electronic device to add first music to the recorded video. The electronic device displays the first interface in the following manner: after selecting the first template, the electronic device displays the first interface in response to a third user action on the third interface.
[0022] 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.
[0023] In another possible design approach of the first aspect, after the first template is selected, the method further includes: the electronic device playing a sample of the first template on a third interface, thereby demonstrating the effect of the video captured using the selected first template. Furthermore, the recording duration needs to match the duration of the sample (e.g., a first duration), such as a first duration being greater than or equal to a preset duration (the upper limit of the recording duration).
[0024] Therefore, by using the method of this embodiment, the electronic device can display the effect of the selected template. Furthermore, the recording duration can be controlled by selecting a template.
[0025] In another possible design of the first aspect, if the first ambient sound includes human voice, then when video content is played on the second interface, the first ambient sound and the first music are played, including: when video content is played on the second interface, the first ambient sound is played at a first volume and the first music is played at a second volume; wherein the first volume is higher than the second volume.
[0026] 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.
[0027] Secondly, embodiments of this application provide a video processing method, which can be applied to electronic devices that support video processing. The electronic device displays a first interface, such as... Figure 9B Interface 911 is shown in (a) and Figure 9B Interface 913, shown in (b) of the diagram, includes a thumbnail of a frame from the first video. In response to a first user action on the thumbnail, the electronic device displays a second interface, such as... Figure 9B Interface 915, shown in (c), includes a first control, such as the "One-Click Movie" button 916 in interface 915. In response to a second user action on the first control, the electronic device displays a third interface, which includes the first video. When the first video is played in the third interface, the video's original sound and first music are played; the video's original sound includes ambient sound captured by the electronic device's microphone during the recording of the first video.
[0028] In summary, the method described in this application treats all videos that trigger "one-click video creation" through a second operation on the first control as videos that do not include background music. That is, the original video audio is not mixed with background music. Based on this, the electronic device retains both the original video audio and background music during the "one-click video creation" process. This ensures that the final video includes both the original video audio and background music without mixing with background music, thereby improving the sound quality of the final video.
[0029] In one possible design approach of the second aspect, the first interface is the interface in the camera application of the electronic device before starting to record video or take a picture, or the first interface is the application interface of the gallery application in the electronic device.
[0030] Therefore, by using the method of this embodiment, electronic devices can perform "one-click video creation" processing on historically saved videos.
[0031] In another possible design approach of the second aspect, the electronic device, in response to the user's first operation on the thumbnail, displays a second interface, including: the electronic device, in response to the user's first operation on the thumbnail, determining that the first video is not a video obtained by adding background music to a video taken by the electronic device, and displaying the second interface, which includes the first control. It should be understood that if the first video is not a video obtained by adding background music to a video taken by the electronic device, then the original audio of the video does not contain background music.
[0032] Therefore, it can be seen that, using the method of this embodiment, the electronic device only provides a "one-click video creation" entry point when the original video soundtrack does not contain background music. This allows for targeted processing.
[0033] In another possible design approach in the second aspect, the above method further includes: if the first video is a video obtained by adding background music to the electronic device, then the original sound of the first video is very likely to include background music. In this case, the electronic device responds to the user's first operation on the thumbnail and displays a fourth interface, which does not include the first control, that is, it does not provide an entry point for "one-click video creation".
[0034] Therefore, by using the method of this embodiment, when the original video sound is mixed with background music, the electronic device does not provide a "one-click to create a video" entry, so as to avoid the sound effect of the video obtained by "one-click to create a video" being chaotic due to the background music mixed in with the original video sound.
[0035] Thirdly, 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; wherein the first interface 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; wherein, during the recording process, the electronic device displays a first identifier indicating a preset duration; and, during the recording process, the speaker of the electronic device does not play a first piece of music, but the user sets the volume of the speaker to be greater than zero. In response to the recording duration reaching the preset duration, the electronic device automatically ends the recording and displays a second interface; wherein the second interface includes the video content, and when the video content is played on the second interface, the first ambient sound and the first piece of music are played.
[0036] In another possible design of the third aspect, when the computer instructions are executed by the processor, the electronic device also performs the following step: in response to a first preset operation by the user on the electronic device, the electronic device sets the volume of the speaker to be greater than zero.
[0037] In another possible design of the third aspect, the first interface includes a second control, which includes a first state and a second state, wherein the first state instructs the electronic device to play the first music, and the second state instructs the electronic device not to play the first music. When the computer instruction is executed by the processor, the electronic device further performs the following steps: determining that the electronic device starts recording the video content when the second control is in the second state, and during the recording process, the speaker does not play the first music.
[0038] In another possible design of the third aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: determining that the electronic device starts recording the video content while the second control is in the first state; during the recording process: the speaker plays the first music, the microphone collects the second ambient sound, and the electronic device displays a first identifier indicating a preset duration. In response to the recording duration reaching the preset duration, the electronic device automatically ends recording and displays a second interface, which includes the video content; wherein, when playing the video content on the second interface, the first music is played, but the second ambient sound is not played.
[0039] In another possible design of the third aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: In response to a second preset operation by the user, the electronic device sets the speaker volume to zero. If the electronic device determines that the speaker volume is zero, it responds to the first operation and begins recording video content. During recording: the microphone captures a third ambient sound; the electronic device displays a first indicator indicating a preset duration; and the user sets the speaker volume to zero. In response to the recording duration reaching the preset duration, the electronic device automatically ends recording and displays a second interface, which includes the video content; wherein, when playing the video content on the second interface, the third ambient sound and the first music are played.
[0040] In another possible design approach in the third aspect, the volume setting for the speaker by the user includes the media volume.
[0041] In another possible design of the third aspect, 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 prompt message in response to a preset change in the volume setting of the speaker by the user; wherein the preset change includes: a change from a volume greater than zero to a volume of zero, or a change from a volume of zero to a volume greater than zero; the first prompt message is used to indicate that the preset change will affect the final result.
[0042] In another possible design of the third aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: the electronic device automatically plays the video content in the second interface. Alternatively, the second interface includes a frame of the video content and a third control, and the electronic device plays the video content in response to a second operation by the user on the third control.
[0043] In another possible design of the third 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 options corresponding to multiple templates, each template used by the electronic device to add corresponding music to a recorded video. In response to a user's selection of a first option, the electronic device selects a first template; the first option is one of the multiple options, the first 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. After selecting the first template, the electronic device, in response to a third user operation on the third interface, displays the first interface.
[0044] In another possible design of the third 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 the third interface, the duration of the sample being a first duration; the first duration is greater than or equal to the preset duration.
[0045] In another possible design of the third aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: when playing the video content on the second interface, playing the first ambient sound at a first volume and playing the first music at a second volume; wherein the first ambient sound includes human voices and the first volume is higher than the second volume.
[0046] Fourthly, embodiments of this application provide an electronic device, the electronic device including 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 following steps: the electronic device displays a first interface, the first interface including a thumbnail of a frame from a first video. In response to a first operation by a user on the thumbnail, the electronic device displays a second interface, the second interface including a first control. In response to a second operation by a user on the first control, the electronic device displays a third interface, the third interface including the first video; wherein, when the first video is played on the third interface, the original soundtrack and first music of the first video are played; the original soundtrack includes ambient sound collected by the microphone of the electronic device during the recording of the first video.
[0047] In another possible design of the fourth aspect, the first interface is the interface in the camera application of the electronic device before starting to record video or take a picture, or the first interface is the application interface of the gallery application in the electronic device.
[0048] In another possible design of the fourth aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: in response to the user's first operation on the thumbnail, the electronic device determines that the first video is not a video obtained by adding background music to a video taken by the electronic device, and displays the second interface, which includes the first control.
[0049] In another possible design of the fourth aspect, when the computer instructions are executed by the processor, the electronic device further performs the following steps: in response to the user's first operation on the thumbnail, the electronic device determines that the first video is a video obtained after the electronic device has added background music, and displays a fourth interface, which does not include the first control.
[0050] Fifthly, 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 configured 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, the second aspect, and any possible design of the present application.
[0051] In a sixth aspect, this application provides a computer storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods described in the first aspect, the second aspect, and any possible design of the thereof.
[0052] In a seventh aspect, this application provides a computer program product that, when run on a computer, causes the computer to perform the methods described in the first aspect, the second aspect, and any possible design of the above.
[0053] It is understood that the beneficial effects achieved by the electronic devices described in the third and fourth aspects above, the chip system described in the fifth aspect, the computer storage medium described in the sixth aspect, and the computer program product described in the seventh 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
[0054] Figure 1 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of this application;
[0055] Figure 2 One of the schematic diagrams of a mobile phone interface provided in the embodiments of this application;
[0056] Figure 3 A second schematic diagram of the mobile phone interface provided in this application embodiment;
[0057] Figure 4 One of the schematic diagrams illustrating the timing of determining volume according to an embodiment of this application;
[0058] Figure 5 This is one of the schematic diagrams illustrating a scenario for determining volume according to an embodiment of this application;
[0059] Figure 6 A second schematic diagram illustrating a scenario for determining volume, provided in an embodiment of this application;
[0060] Figure 7A The third schematic diagram illustrating the scenario of determining volume provided in this application embodiment;
[0061] 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;
[0062] Figure 7C Fourth schematic diagram of a scenario for determining volume provided in an embodiment of this application;
[0063] Figure 8A Fifth schematic diagram of a scenario for determining volume provided in an embodiment of this application;
[0064] Figure 8B The third schematic diagram of the mobile phone interface provided in this application embodiment;
[0065] Figure 8C Fourth schematic diagram of the mobile phone interface provided in this application embodiment;
[0066] Figure 9A Fifth schematic diagram of the mobile phone interface provided in this application embodiment;
[0067] Figure 9B Sixth schematic diagram of the mobile phone interface provided in this application embodiment;
[0068] Figure 10A A second schematic diagram illustrating the timing of determining volume according to an embodiment of this application;
[0069] Figure 10B A sixth schematic diagram illustrating a scenario for determining volume, provided as an embodiment of this application;
[0070] Figure 11A Seventh schematic diagram of the mobile phone interface provided in the embodiments of this application;
[0071] Figure 11B Seventh schematic diagram of a scenario for determining volume provided in an embodiment of this application;
[0072] Figure 11C Eighth schematic diagram of a scenario for determining volume as provided in the embodiments of this application;
[0073] Figure 12 Eighth schematic diagram of the mobile phone interface provided in this application embodiment;
[0074] Figure 13 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation
[0075] 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.
[0076] 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.
[0077] 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.
[0078] 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.
[0079] See Figure 1 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. Figure 1 As 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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 two scenarios: Scenario 1, selecting an effect template before video recording; Scenario 2, selecting an effect template after video recording. The biggest difference between Scenario 1 and Scenario 2 is that if an effect template is selected before video recording, the background music corresponding to that effect template can be played during video recording. In this case, the ambient sound (i.e., the original video sound) collected during video recording may include the background music played during recording, as well as human voices, ocean waves, etc. The following will describe these two scenarios respectively, and the specific implementation of the solution of this application in these two scenarios.
[0096] Scene 1: Select an effect template before shooting the video.
[0097] 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 2 The 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.
[0098] 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.
[0099] Before starting video recording, the phone can display multiple template options (or simply multiple 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 Interface 301, shown in (a) of the diagram, includes multiple templates such as "Hello Summer," "Beautiful Time," "Good Mood," and "Relaxing Weekend." Each effect template corresponds to a final video effect, which includes background music (or simply music), filters, special effects (such as twinkling stars), transitions, frames, stickers, etc. In other words, effect templates can be used to instruct the phone on the background music, filters, special effects, etc., to be added to the video being shot, allowing the phone to add these effects according to the template's instructions, ultimately resulting in a final 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 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.
[0100] 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.
[0101] 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 3The 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.
[0102] 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.
[0103] 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.
[0104] In one specific implementation, the shooting preparation interface may include control 2 (also known as the second control), such as... Figure 3 The 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. It should be understood that the playback state can default to either on or off, and this embodiment does not specifically limit this. In addition, in actual implementation, multiple template options can also be displayed on the interface (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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] After video recording begins, the phone can detect event 1. In response to event 1, video recording can be stopped.
[0109] 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 3In 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, continuously filling circles, etc. Furthermore, for ease of explanation, the identifier indicating the preset duration can be designated as the first identifier.
[0110] 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, the power consumption of the phone can be reduced by limiting the recording duration. For example, the fixed duration is 30 seconds.
[0111] 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 3 In (b) shown in the diagram, button 307 in interface 304, event 1 can be a user's click operation on button 307.
[0112] 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.
[0113] See Figure 4In Scenario 1 above, using 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. In Scenario 1, the original video sound refers to the ambient sound collected during video shooting. The background music refers to the background music corresponding to Template 1, which is added during the process of processing the video 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:
[0114] Scenario 1: No background music was played during filming.
[0115] Before recording a video, the phone can turn the 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.
[0116] See Figure 5 In scenario (b), the phone's microphone will naturally not pick up the background music played from the external speaker. For ease of explanation, the ambient sound picked up by the phone's microphone in scenario 1 can be referred to as the first ambient sound. It should be understood that "playing from the external speaker" refers to the sound played through the phone's speaker (e.g.,...). 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.
[0117] 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).
[0118] 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.
[0119] 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.
[0120] 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.
[0121] 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 was played during shooting, but the user set the speaker volume to not zero (e.g., greater than zero). Figure 5 As shown in (b), the speaker has volume. In practice, the mobile phone can receive operations from the user setting the speaker volume to zero (also known as the second preset operation), such as the user pressing the volume down button or the mute button, or the user clicking the button to turn off the speaker sound. In response to this operation, the mobile phone can set the speaker volume to zero. The mobile phone can also receive operations from the user setting the speaker volume to non-zero (also known as the first preset operation), such as the user pressing the volume up button or the mute button, or the user clicking the button to turn on the speaker sound. In response to this operation, the mobile phone can set the speaker volume to non-zero. It should be understood that if the user sets the speaker volume to non-zero before starting video recording, the user's setting of the speaker volume will be non-zero during video recording. Conversely, if the user sets the speaker volume to zero before starting video recording, the user's setting of the speaker volume will be zero during video recording.
[0122] In addition, the speaker volume includes ringtone sound, media sound, and / or notification sound, etc. Generally, the music playback volume is determined by the media volume; therefore, the volume setting a user makes for the speaker usually refers to the media sound volume setting. In the following embodiments, the solution of this application will primarily be illustrated using media sound as an example.
[0123] Scenario 2: Background music is played during filming.
[0124] 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 6 In (b) of the example, the phone's microphone can pick up the background music being played. For ease of explanation, the ambient sound picked up by the phone in this case can be referred to as the second ambient sound. Correspondingly, the original video soundtrack includes the background music being played. In other words, the original video soundtrack contains mixed background music.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] In the aforementioned embodiment regarding scenario 2, it is assumed that the phone plays background music via speakerphone. That is, it is assumed that the phone can 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 if it plays during video recording.
[0130] 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 media audio status and / or whether headphones are connected to the phone. Specifically, scenario 2 may include the following sub-scenarios.
[0131] Situation 21: Media audio is muted.
[0132] 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).
[0133] 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.
[0134] 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.
[0135] 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.
[0136] Case 22: The phone is connected to headphones.
[0137] 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.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] 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:
[0142] Situation 23: The media audio is not muted, or the phone is not connected to headphones.
[0143] 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.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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 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 8BInterface 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, during shooting, if the phone detects that the user has changed the sound state due to media settings (also known as a preset change), the phone can display prompt information 3 (also known as the first prompt information) in the viewfinder during shooting. Prompt information 3 is used to indicate that changes in the sound state of the media will affect the final video quality. For example, if the phone detects that the media sound 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.
[0149] 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 during filming. Therefore, the generated video sound and background music can be set to be non-zero. When playing the final video after filming, the ambient sound (also known as third ambient sound) picked up by the microphone during filming and the background music 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 as a secondary factor.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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 the figure as a light gray with transparency) and stickers such as "Summer feelings, the most beautiful summer, we are together".
[0154] 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 (also known as third controls). Then, the phone plays the finished video in response to the user's click or long press of the play button (also known as second operation). 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.
[0155] 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 8C The interface 811 shown in (a) includes buttons 813, 814, and 815. Button 813 triggers a style change on the phone, button 814 triggers a background music change, and button 815 triggers various effects such as filters, stickers, frames, and volume control. Editing operations can be user clicks on buttons 813, 814, and / or 815. The preview interface may 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 video. 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 video 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.
[0156] 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 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.
[0157] 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.
[0158] Scene 2: Select an effect template after the video is recorded.
[0159] Before shooting a video, the phone can choose not to select an effect template. Instead, after the video is shot and saved, a random effect template (such as template 2) can be selected to process the saved video and create a finished product with the same effect as template 2.
[0160] For example, in multi-camera recording mode, see [link to example]. Figure 9A In (a) of the above, in the viewfinder interface before video recording, such as interface 901, the mobile phone can receive user operation 3. This operation 3 is used to trigger the mobile phone to start video recording directly without selecting an effect template. For example, the viewfinder interface before recording includes control 6, such as... Figure 9A (a) shows button 902 in interface 901. Control 6 is used to trigger the phone to start video recording without selecting an effect template. Operation 3 can be a user click on control 6. In response to operation 3, the phone can start video recording and display the viewfinder interface for video recording, such as... Figure 9A Interface 903 is shown in (b) of the diagram. After recording begins, the phone can receive user operation 4, which triggers the phone to end video recording. For example, the viewfinder during recording includes a control 7, such as button 904 in interface 903. Control 7 is used to trigger the phone to end video recording; operation 4 can be a user tap or long press on control 7. In response to operation 4, the phone can end video recording and store the recorded video.
[0161] See Figure 9B (a) and Figure 9B In embodiment (c), after the video is stored, the phone can re-display the viewfinder from before video recording. The viewfinder from before video recording displays a thumbnail of the stored video. For example, after the video is stored, the phone can display... Figure 9BInterface 911, shown in (a) above, is the viewfinder for video recording. A thumbnail of the stored video is displayed in the lower left corner of this interface 911. The phone can receive a tap or long-press action (also known as a first action) from the user on this thumbnail. In response to the user's tap or long-press action on the thumbnail, the phone can display a video editing interface, such as... Figure 9B Interface 915 is shown in (c) of the diagram. In the video editing interface, the mobile phone can edit the stored video. For ease of explanation, the viewfinder screen displayed on the phone before video recording after the video is saved can be called the first interface; the video pointed to by the thumbnail displayed in this viewfinder screen can be called the first video. The first video can be any video recorded by the mobile phone, including videos recorded with an effect template selected before recording, or videos recorded without selecting an effect template before recording. The video editing interface can also be called the second interface. It should be understood that the first video is the video to be edited.
[0162] See Figure 9B (b) and Figure 9B In (c) of the above, in some other embodiments, the gallery application's interface displays thumbnails of various image and video resources. These image or video resources may be captured and stored by the mobile phone, for example, videos captured and stored without selecting an effect template before shooting, or they may be downloaded from the internet or synced to the cloud. For example, Figure 9B The interface 913 shown in (b) is the application interface of the gallery application. Interface 913 includes a thumbnail of video 914 and thumbnails of multiple images. In the gallery application, the phone can receive a user's selection operation (also referred to as the first operation) of any video thumbnail. In response to the user's selection operation of any video thumbnail, the phone can display a video editing interface. For example, in response to the user's click operation on video 914 in interface 913, the phone can display... Figure 9B Interface 915, shown in (c) above, is the editing interface for video 914. For ease of explanation, the application interface of the gallery application can be referred to as the first interface; the video pointed to by the thumbnail displayed in the application interface of the gallery application can be referred to as the first video. The first video can be any video on the mobile phone, including videos shot by the mobile phone or downloaded from the internet. Similarly, the video editing interface can be referred to as the second interface. The first video is the video to be edited.
[0163] In this embodiment of the application, the video editing interface includes control 8, such as... Figure 9B(c) shows the "One-Click Movie" button 916 in interface 915. Control 8 is used to trigger the phone to process the video to be edited using a random effect template (such as template 2), such as adding background music, filters, special effects (such as twinkling stars), transitions, frames, stickers, etc. The phone can receive user clicks or long presses on control 8. In response to user clicks or long presses on control 8 (also known as "One-Click Movie"), the phone can process the video to be edited using a random effect template (such as template 2). For example, adding background music, filters, etc., to create a finished video with the effects of template 2. For ease of explanation, control 8 can be referred to as the first control, and user clicks or long presses on control 8 can be referred to as the second operation. And the background music corresponding to template 1 can be referred to as the first music.
[0164] See Figure 10A In scenario 2 above, using the solution of this application, during the process of the mobile phone responding to the user's "one-click video creation" operation and processing the video according to a random effect template (such as template 2), the original volume of the video's original sound and the volume of the background music can be further determined. In scenario 2, the original video sound refers to the sound captured during the video recording process. The background music refers to the background music corresponding to template 2. Specifically, the specific implementation for determining the original sound volume and music volume is as follows:
[0165] See Figure 10B Typically, videos shot and stored without selecting an effect template do not include background music during or after shooting. Furthermore, these videos are usually intended for use with a "one-click edit" function to trigger the addition of background music, filters, and special effects. Therefore, in some embodiments, all videos that trigger the addition of background music, filters, and special effects through a "one-click edit" function are considered videos without background music. In other words, the original video audio is not mixed with background music. Based on this, in response to the user's "one-click edit" operation, the phone can set both the original audio volume and the background music (such as the background music in template 2) to non-zero values. This ensures that the finished video includes both the original audio and background music without mixing with the original audio. Consequently, when playing the finished video later, both the original audio and background music can be played simultaneously.
[0166] In some scenarios, users may also use the "One-Click Edit" function again to process videos that have already been processed using an effect template (such as template 1). To avoid the audio from multiple effect templates stacking and causing confusion in the final video, in other embodiments, the phone can add a processing identifier to each video segment, adding a first identifier to videos processed using an effect template, and / or adding a second identifier to videos not processed using an effect template. Processing with an effect template includes: processing with an effect template (such as template 1) in scenario 1, or processing with an effect template (such as template 2) in scenario 2. For example, after adding a processing identifier to each video segment, the phone can display... Figure 11A The illustrated gallery application interface 1101 displays thumbnails of videos 1102, 1103, 1104, and several images. Videos 1103 and 1104 have a five-pointed star (the first identifier) in their upper right corner, indicating that they have been processed by the phone using an effects template. Video 1102 does not have a five-pointed star in its upper right corner, indicating that it has not been processed using an effects template.
[0167] See Figure 11B In embodiment (a), the mobile phone responds to the user's "one-click video creation" operation, and if a video to be edited (e.g.) is found... Figure 11A The processing identifier for video 1104 shown is the first identifier, meaning the video to be edited was obtained by the phone using an effect template (such as template 1). Therefore, the original video audio may contain background music (such as the background music corresponding to template 1). The phone can set the original volume of the video audio to zero; and replace the existing background music in the video to be edited with the background music from this randomly selected template, setting the volume of the replaced music to a non-zero value. Consequently, when playing the finished video later, only the background music can be played, not the original video audio. It should be understood that in... Figure 11B In the editing interface shown in (a), the text "processed with effect template" indicates that the current video has been processed with an effect template, but this may not actually be displayed.
[0168] See Figure 11B In embodiment (b), the mobile phone responds to the user's "one-click video creation" operation, and if the current video (e.g., ...) is found... Figure 11AThe processing identifier for video 1102 shown is the second identifier, meaning the video to be edited is a video obtained without being processed by the electronic device using the template. Therefore, the original video sound does not contain background music (such as the background music in template 1). The mobile phone can set both the original video sound volume and the background music volume to non-zero values, for example, both to 100 decibels. Correspondingly, when playing the finished video later, both the background music and the original video sound can be played simultaneously. Similarly, in... Figure 11B In the editing interface shown in (b), the text "Unprocessed by effects template" indicates that the current video is an unprocessed video, but this may not actually be displayed.
[0169] Or see Figure 11C In this embodiment, if a video to be edited (e.g.) is found... Figure 11A The processing identifier for video 1104 shown is the first identifier, meaning the video to be edited was processed by the phone using an effect template (such as template 1). Therefore, in response to user clicks or long presses on the thumbnail, the phone will only display a standard editing interface (also known as the fourth interface) that does not include the "One-Click Editing" option. Subsequent "One-Click Editing" cannot be completed; instead, editing settings must be performed item by item. This improves the targeted nature of "One-Click Editing."
[0170] After adding background music, filters, and other effects to the captured video according to a random effect template (such as template 2), and setting the original volume of the video's audio and the volume of the background music, a finished video can be created. Similar to Scenario 1, after the finished video is created, the phone can directly save it; alternatively, a preview interface (also known as a third interface) can be displayed first, and then the finished video can be saved in response to the user's save operation. For details, please refer to the relevant instructions in Scenario 1, which will not be repeated here.
[0171] The only difference from Scenario 1 is that in Scenario 2, after saving the final video, the phone can restore the video editing interface. Unlike the video editing interface before "One-Click Creation," the restored video editing interface includes the final video but does not include control 8, such as the "One-Click Creation" button. For example, after saving the final video, the phone displays the following video editing interface: Figure 12 Interface 1201 is shown in (a) of the diagram. (The diagram is related to...) Figure 9B Compared to interface 915 (i.e., the video editing interface before "One-Click Edit") shown in (c), the video in interface 1201 has effects such as filters and stickers and is the finished product of the video in interface 915; and interface 1201 does not include the "One-Click Edit" button.
[0172] Next, the phone can receive user operation 5 on the video editing interface. Operation 5 triggers the phone to return to the gallery application interface. Operation 5 could be a right swipe from the left edge of the video editing interface inwards. Alternatively, the video editing interface may include a back control, such as... Figure 12 Button 1202 is shown in (a) above. Operation 5 can be a user's click operation on the return control. In this embodiment, the form of operation 5 is not specifically limited. In response to operation 5, the mobile phone can display the application interface of the gallery application. At this time, the application interface of the gallery application includes thumbnails of the generated images. For example, in response to operation 5, the mobile phone can display Figure 12 Interface 1203 is shown in (b) above, and includes a thumbnail 1204. The thumbnail 1204 is a thumbnail of the most recently saved image.
[0173] After the photo is saved on the phone, the phone can receive user clicks or long-presses on the thumbnail of the photo in the gallery app interface, and the phone can then display the complete photo. This allows for viewing the entire photo. Furthermore, when playing the complete photo, the volume of the original video sound and background music is consistent with what was determined in the aforementioned processing.
[0174] 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.
[0175] This application also provides a chip system, such as... Figure 13 As shown, the chip system 1300 includes at least one processor 1301 and at least one interface circuit 1302. The processor 1301 and the interface circuit 1302 are interconnected via lines. For example, the interface circuit 1302 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1302 can be used to send signals to other devices (e.g., the processor 1301). Exemplarily, the interface circuit 1302 can read instructions stored in memory and send those instructions to the processor 1301. When the instructions are executed by the processor 1301, the electronic device can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.
[0176] 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.
[0177] 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.
[0178] 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.
[0179] 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 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.
[0180] 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.
[0181] 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.
[0182] 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.
[0183] 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 selects a first template, which is used by the electronic device to add first music to the recorded video. The electronic device displays a first interface; wherein the first interface includes a preview image captured by the camera in the electronic device and a first control; the first interface includes a second control, the second control being used to trigger the electronic device to change the playback state of the first music, the playback state including a first state and a second state, the first state indicating that the electronic device plays the first music, and the second state indicating that the electronic device does not play the first music; 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 a first ambient sound through its microphone; during the recording process, the electronic device displays a first identifier indicating a preset duration; and when the playback state is the second state, the recording of the video content begins, during which the electronic device's speaker does not play the first music, but the user sets the speaker volume to be greater than zero. The electronic device automatically ends recording and displays a second interface when the recording time reaches the preset time. The second interface includes the video content, and when the video content is played on the second interface, the first ambient sound and the first music are played.
2. The method according to claim 1, characterized in that, Before starting to record video content, the method further includes: In response to a user's first preset operation on the electronic device, the electronic device sets the volume of the speaker to be greater than zero.
3. The method according to claim 1, characterized in that, The method further includes: When the playback state is the first state, the video content is recorded. During the recording process: the speaker plays the first music, the microphone collects the second ambient sound, and the electronic device displays a first identifier, which indicates a preset duration. The electronic device automatically ends recording and displays a second interface when the recording time reaches the preset time. The second interface includes the video content. When the video content is played on the second interface, the first music is played, but the second ambient sound is not played.
4. The method according to claim 1, characterized in that, Before starting to record video content, the method further includes: The electronic device responds to a second preset operation by the user to set the volume of the speaker to zero; After setting the speaker volume to zero, the method further includes: In response to the first operation, the electronic device begins recording video content. During the recording process: the microphone collects third ambient sound, the electronic device displays a first identifier, the first identifier indicates a preset duration, and the user sets the volume of the speaker to zero. The electronic device automatically ends recording and displays a second interface when the recording time reaches the preset time. The second interface includes the video content. When the video content is played on the second interface, the third ambient sound and the first music are played.
5. The method according to claim 1, characterized in that, The volume setting for the speaker by the user includes the media volume.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: During recording, the electronic device displays a first prompt message in response to a preset change in the volume setting of the speaker by the user; wherein the preset change includes: a change from a volume greater than zero to a volume of zero, or a change from a volume of zero to a volume greater than zero; the first prompt message is used to indicate that the preset change will affect the final result.
7. The method according to any one of claims 1-5, characterized in that, After displaying the second interface, the method further includes: The electronic device automatically plays the video content on the second interface; Alternatively, the second interface may include a frame of the video content and a third control, and the method may further include: the electronic device playing the video content in response to a second operation by the user on the third control.
8. The method according to any one of claims 1-5, characterized in that, Before the electronic device selects the first template, the method further includes: The electronic device displays a third interface, which includes multiple options and multiple templates. Each template is used by the electronic device to add corresponding music to the recorded video. The electronic device selects a first template, including: The electronic device responds to the user's selection of the first option and selects the first template; the first option is one of the plurality of options, the first option corresponds to the first template, and the first template is used by the electronic device to add the first music to the recorded video.
9. The method according to claim 8, 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, and the duration of the sample is a first duration; the first duration is greater than or equal to the preset duration.
10. The method according to any one of claims 1-5, characterized in that, The first ambient sound includes human voices, and the step of playing the first ambient sound and the first music when playing the video content on the second interface includes: When the video content is played on the second interface, the first ambient sound is played at a first volume and the first music is played at a second volume; wherein the first volume is higher than the second volume.
11. The method according to claim 1, characterized in that, After displaying the second interface, the method further includes: The electronic device displays a fifth interface, which includes a first thumbnail of a frame from a first video. The first video includes the video content, and the original sound of the first video includes the first ambient sound and the first music. In response to a user's triggering operation on the first thumbnail, the electronic device determines that the first video is a video obtained after the electronic device adds background music, and displays a fourth interface. The background music includes the first music. The fourth interface does not include a first control, which is used to trigger the electronic device to add background music to the video.
12. The method according to claim 11, characterized in that, The fifth interface is the interface in the camera application of the electronic device before starting to record video or take a picture, or the fifth interface is the application interface of the gallery application in the electronic device.
13. The method according to claim 11, characterized in that, The method further includes, either before the electronic device displays the fifth interface, or after the fourth interface is displayed: The electronic device displays a sixth interface, which includes a second thumbnail of a frame from the second video. The original audio of the second video includes ambient sound collected by the microphone of the electronic device during the recording of the second video, but does not include background music. In response to a user's triggering operation on the second thumbnail, the electronic device determines that the second video is not a video obtained by adding background music to the electronic device, and displays a seventh interface, which includes the first control. The electronic device responds to the user's triggering operation on the first control and displays a seventh interface, which includes a third video; wherein, when the third video is played on the seventh interface, the original sound and background music of the second video are played.
14. 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-13.
15. 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-13.
Citation Information
Patent Citations
Method and device for determining video background music, terminal equipment and storage medium
CN108900902A