CN115022536B - Video shooting method, device, electronic equipment and storage medium - Google Patents

Video shooting method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115022536B
CN115022536B CN202210572112.9A CN202210572112A CN115022536B CN 115022536 B CN115022536 B CN 115022536B CN 202210572112 A CN202210572112 A CN 202210572112A CN 115022536 B CN115022536 B CN 115022536B
Authority
CN
China
Prior art keywords
wireless earphone
electronic device
video
wireless
shooting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210572112.9A
Other languages
Chinese (zh)
Other versions
CN115022536A (en
Inventor
高尚秀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210572112.9A priority Critical patent/CN115022536B/en
Publication of CN115022536A publication Critical patent/CN115022536A/en
Application granted granted Critical
Publication of CN115022536B publication Critical patent/CN115022536B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R5/00Stereophonic arrangements
    • H04R5/033Headphones for stereophonic communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R5/00Stereophonic arrangements
    • H04R5/04Circuit arrangements, e.g. for selective connection of amplifier inputs/outputs to loudspeakers, for loudspeaker detection, or for adaptation of settings to personal preferences or hearing impairments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/10537Audio or video recording
    • G11B2020/10546Audio or video recording specifically adapted for audio data
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B2020/10935Digital recording or reproducing wherein a time constraint must be met
    • G11B2020/10953Concurrent recording or playback of different streams or files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a video shooting method, a device, an electronic device and a storage medium, wherein the video shooting method is applied to the electronic device, the electronic device comprises a camera, and the electronic device is connected with a wireless earphone, and the method comprises the following steps: if the current display interface is a shooting interface, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode if the connection between the electronic equipment and the wireless earphone is in a monitoring mode; responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images; receiving audio data collected by the wireless earphone; and generating shooting video based on the image acquired by the camera and the audio data. The method can improve the speed of starting the recording of the wireless earphone when the video shooting is carried out, and avoid the situation of asynchronous sound and picture.

Description

Video shooting method, device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of electronic devices, and in particular, to a video capturing method, a video capturing device, an electronic device, and a storage medium.
Background
With rapid progress in the scientific and technological level and the living standard, wireless headphones are increasingly used due to the characteristics of portability and the like. Among them, true wireless stereo (True Wireless Stereo, TWS) headphones are more popular with users because they completely eliminate the trouble of wires and are more free to use. Also, current wireless headsets are typically provided with microphones for the collection of sound in a recording scene. However, when video is shot, audio is acquired by using a wireless earphone, and the situation that audio and video are not synchronous is easy to occur.
Disclosure of Invention
The application provides a video shooting method, a video shooting device, electronic equipment and a storage medium, which can improve the speed of starting recording by a wireless earphone when video shooting is carried out, and avoid the situation of asynchronous audio and video.
In a first aspect, an embodiment of the present application provides a video capturing method, which is applied to an electronic device, where the electronic device includes a camera, and the electronic device is connected to a wireless earphone, and the method includes: if the current display interface is a shooting interface, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode if the connection between the electronic equipment and the wireless earphone is in a monitoring mode; responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images; receiving audio data collected by the wireless earphone; and generating shooting video based on the image acquired by the camera and the audio data.
In a second aspect, an embodiment of the present application provides a video capturing apparatus, which is applied to an electronic device, where the electronic device includes a camera, and the electronic device is connected to a wireless earphone, and the apparatus includes: the system comprises a mode control module, a shooting starting module, an audio receiving module and a video generating module, wherein the mode control module is used for controlling the connection between the electronic equipment and the wireless earphone to be in an active mode if the connection between the electronic equipment and the wireless earphone is in a monitoring mode under the condition that a current display interface is a shooting interface; the shooting starting module is used for responding to video shooting operation, sending a recording instruction to the wireless earphone and controlling the camera to acquire images; the audio receiving module is used for receiving audio data acquired by the wireless earphone; the video generation module is used for generating shooting video based on the image acquired by the camera and the audio data.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the video capture method provided in the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer readable storage medium having stored therein program code that is callable by a processor to perform the video photographing method provided in the first aspect above.
According to the scheme provided by the application, under the condition that the current display interface of the electronic equipment is a shooting interface, if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, the connection between the electronic equipment and the wireless earphone is controlled to be in an active mode, then a recording instruction is sent to the wireless earphone in response to video shooting operation, a camera is controlled to collect images, audio data collected by the wireless earphone is received, and shooting videos are generated based on the images and the audio data collected by the camera. Therefore, under the condition that the electronic equipment displays a shooting interface, the connection between the electronic equipment and the wireless earphone is controlled to be changed into an active mode from a monitoring mode, so that delay of transmission of a recording instruction to the wireless earphone is avoided, the speed of starting recording by the wireless earphone is further improved, and the situation that sound and picture are not synchronous is avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a schematic view of a scene related to a video shooting method according to an embodiment of the present application.
Fig. 2 shows a schematic structural diagram of a wireless earphone according to an embodiment of the present application.
Fig. 3 shows a flow chart of a video photographing method according to an embodiment of the present application.
Fig. 4 shows a flowchart of a video photographing method according to another embodiment of the present application.
Fig. 5 shows a flowchart of a video photographing method according to still another embodiment of the present application.
Fig. 6 shows a flowchart of a video photographing method according to still another embodiment of the present application.
Fig. 7 shows a flowchart of step S430 in the video capturing method according to the embodiment of the present application.
Fig. 8 shows a block diagram of a video photographing apparatus according to an embodiment of the present application.
Fig. 9 is a block diagram of an electronic device for performing a video photographing method according to an embodiment of the present application.
Fig. 10 is a storage unit for storing or carrying program codes for implementing a video photographing method according to an embodiment of the present application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings.
Binaural sound recording (Binaural Audio) is a recording technique that highly restores a realistic sensation of hearing by providing microphones at the two ear positions of an artificial head so that sound reaching each ear position can be captured and two signals can be reproduced on each ear separately. Such reproduction is not suitable for mono playback and if the desired effect is not achieved by using loudspeakers, headphones are typically used to completely isolate the acoustic signals received by the two ears, which can cause the artificial head to completely reproduce what is heard by the listener. Binaural sound recordings are therefore also applied in video shooting.
In the related art, a wireless headset is typically connected to an electronic device through bluetooth technology. In bluetooth technology, the connection between bluetooth devices may be in any of the following four modes: active mode (active mode), hold mode (hold mode), listening mode (sniff mode) and sleep mode (park mode). For example, the active mode is that communication is performed in an agreed time slot (Tpoll) after connection is established between bluetooth devices; the monitoring mode is a low-power consumption mode designed for reducing Bluetooth power consumption, and the purpose of saving power is achieved by reducing the number of time slots for transmitting data by the master device and correspondingly reducing the number of time slots for monitoring by the slave device, and in the monitoring mode, the master device transmits data packets to the slave device every preset monitoring time slot (Tsniff), so that the slave device monitors the data packets of the master device every Tsniff, and the slave device monitors only when monitoring an anchor point (sniff anchor point).
By way of example, it is assumed that tpoll=25 milliseconds (ms), tsniff=500 ms, that is to say that the devices synchronize once every 25ms in the active mode and once every 500ms in the listening mode. Therefore, the listening mode can greatly reduce bluetooth power consumption, but when synchronization information is needed between the devices, the synchronization information is not needed, and the waiting time is needed to reach sniff mode anchor point.
Further, in the bluetooth protocol, when a large amount of data needs to be transmitted, the bluetooth chip is required to exit from the listening mode and enter into the active mode; when the data transmission is finished, the Bluetooth chip is requested to enter a monitoring mode if the data transmission is not carried out within a certain time.
In a video shooting scene, as shown in fig. 1, if the bluetooth devices are in a monitoring mode, when the electronic device starts to perform video shooting, a protocol stack at the electronic device side requests the bluetooth chip to exit the monitoring mode, and then sends a control instruction for starting recording to the earphone. In this way, in the process of starting recording, the wireless earphone receives a control instruction of recording and has larger delay, so when the mobile phone terminal is pressed to shoot, the time point when the wireless earphone receives the control instruction and collects audio data and the time collection point when the mobile phone terminal collects video data have larger time difference, and therefore, the audio in the time period can be lost, and the problem of asynchronous audio and video in the recorded video in the time period is caused.
In order to solve the problems, the inventor proposes the video shooting method, the video shooting device, the electronic equipment and the storage medium provided by the embodiment of the application, so that the connection between the electronic equipment and the wireless earphone is controlled to be changed from a monitoring mode to an active mode under the condition that the shooting interface is displayed by the electronic equipment, thereby avoiding the delay of the transmission of a recording instruction to the wireless earphone, further improving the speed of starting recording by the wireless earphone, and avoiding the situation of asynchronous sound and picture. The specific video capturing method is described in detail in the following embodiments.
The following describes a scenario related to an embodiment of the present application.
As shown in fig. 1, in the scenario shown in fig. 1, the electronic device 100 and the wireless headset 200 are included, where the electronic device 100 is connected to the wireless headset 200, and the wireless headset 200 is in a wearing state shown in the figure. Also, the electronic device 100 includes a camera 130; referring to fig. 2, an audio capturing device 210 is disposed in the wireless headset 200, and the audio capturing device 210 may be a microphone or the like. Thus, when the electronic device 100 performs video capturing, an image may be captured by the camera 130 and audio capturing may be performed by the wireless headset 200, so that a captured video may be generated according to the captured image and the captured audio data.
In some embodiments, the wireless earphone 200 may include a first wireless earphone and a second wireless earphone, where the first wireless earphone and the second wireless earphone may be connected with the electronic device, so that when the electronic device performs video shooting, the electronic device may perform audio collection by using the first wireless earphone and the second wireless earphone, thereby implementing binaural sound recording, and improving the shooting effect of the video. As an embodiment, when the electronic device 100 is connected to the first wireless earphone, the first wireless earphone is connected to the second wireless earphone, that is, the first wireless earphone is the second wireless earphone and a relay earphone of the electronic device 100, the first wireless earphone may be used as a master earphone, and the second wireless earphone may be used as a slave earphone, in this embodiment, when data is transmitted between the second wireless earphone and the electronic device 100, the data is transmitted through the first wireless earphone as the relay earphone, that is, the data transmitted between the first wireless earphone and the second wireless earphone is transmitted through the first wireless earphone; as another embodiment, the electronic device 100 can be connected to the first wireless headset and the second wireless headset at the same time, and the first wireless headset and the second wireless headset can directly perform data transmission with the electronic device 100.
The video shooting method provided by the embodiment of the application is described in detail below with reference to the accompanying drawings.
Referring to fig. 3, fig. 3 is a flowchart illustrating a video shooting method according to an embodiment of the application. In a specific embodiment, the video photographing method is applied to the video photographing apparatus 400 shown in fig. 8 and the electronic device 100 (fig. 9) configured with the video photographing apparatus 400. The specific flow of the embodiment will be described below by taking an electronic device as an example, and it will be understood that the electronic device applied in the embodiment may be a smart phone, a tablet computer, a smart watch, an electronic book, etc., which is not limited herein. The following will describe the flowchart shown in fig. 3 in detail, and the video capturing method specifically may include the following steps:
step S110: and if the current display interface is a shooting interface, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode if the connection between the electronic equipment and the wireless earphone is in a monitoring mode.
In the embodiment of the application, the electronic equipment can monitor the current display interface displayed on the foreground, and can determine whether the connection between the electronic equipment and the wireless earphone is in a monitoring mode or not under the condition that the current display interface is a shooting interface, so as to control the connection between the electronic equipment and the wireless earphone to be in the monitoring mode under the condition that the connection between the electronic equipment and the wireless earphone is in the monitoring mode. It can be understood that, when the current display interface of the electronic device is a shooting interface, a user may take video by using the electronic device, if the connection between the electronic device and the wireless earphone is in a monitoring mode during video shooting, when the electronic device sends a recording instruction to the wireless earphone, the wireless earphone receives a recording instruction with a larger delay, so that the audio and the video are asynchronous, so the electronic device can determine whether the connection between the electronic device and the wireless earphone is in the monitoring mode when detecting that the current display interface is the shooting interface, and control the connection to be switched to an active mode when the connection between the electronic device and the wireless earphone is in the monitoring mode. Of course, if the connection of the electronic device and the wireless headset is in the active mode at this time, the electronic device may not perform the processing.
In some embodiments, the electronic device may detect a launch-run application, which may be a foreground run or a background run. The foreground operation refers to the operation of the foreground of the electronic equipment, wherein the foreground operation can be interacted with by a user, and can be hung when the foreground operation is invisible (such as a game application); background running means very limited interaction with the user, and other times of its lifetime are hidden except during configuration (e.g., chat applications). When the electronic device detects that the current application program running in the foreground is an application program capable of shooting video, such as an application program of shooting application, video chat application, short video application and the like, whether the current display interface is a shooting interface can be determined, if the current display interface is the shooting interface, a user can possibly use the electronic device to shoot video, so that when the connection between the electronic device and the wireless earphone is in a monitoring mode, the connection between the electronic device and the wireless earphone is controlled to be in an active mode.
In some embodiments, the electronic device controls the connection with the wireless earphone to be in an active mode, which may be to request the communication chip (such as a bluetooth chip) corresponding to the connection to enter the active mode and prohibit entering the listening mode; the electronic device may also frequently send data to the wireless headset to cause the connection of the electronic device to the wireless headset to exit the listening mode and remain in the active mode. Of course, the specific manner in which the electronic device controls the connection with the wireless headset in the active mode may not be limited.
Step S120: and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images.
In the embodiment of the application, under the condition that the electronic equipment displays the shooting interface, the operation input by a user can be detected, when the video shooting operation is detected, the video shooting operation is responded, the video image is shot through the camera of the electronic equipment, and the recording is carried out through the connected wireless earphone, so that the shot video is obtained. For example, a target control is displayed in the shooting interface, and the target control is used for triggering video shooting, so that touch operation on the target control can be detected, and when touch operation on the target control is detected, video shooting is performed in response to the touch operation. When the electronic equipment shoots videos, if video images are collected through the camera of the electronic equipment and recording is carried out through the connected wireless earphone, a recording instruction can be sent to the wireless earphone and used for controlling the camera to collect images, and the recording instruction is used for indicating the wireless earphone to collect audio data. The scenes in which the electronic device performs video capturing may include, but are not limited to, video calls, video conferences, video teaching, video live broadcasting, short video capturing, and the like.
In some embodiments, the electronic device may control the camera to perform image acquisition, may control the front camera to perform image acquisition, and may also control the rear camera to perform image acquisition. That is, when the electronic device performs video shooting, the front camera may be used for shooting, or the rear camera may be used for shooting, which is not limited herein.
In some implementations, the wireless headphones to which the electronic device is connected may include a first wireless headphone and a second wireless headphone. Under the condition that the electronic equipment is connected with the first wireless earphone and the second wireless earphone at the same time, a recording instruction can be sent to the first wireless earphone and the second wireless earphone at the same time so as to instruct the first wireless earphone and the second wireless earphone to start to collect audio data; under the condition that the electronic equipment is connected to the first wireless earphone and is connected with the second wireless earphone through the first wireless earphone, a recording instruction can be sent to the first wireless earphone, and after the first wireless earphone receives the recording instruction, the recording instruction can be sent to the second wireless earphone, so that the first wireless earphone and the second wireless earphone can acquire audio data.
Step S130: and receiving the audio data collected by the wireless earphone.
In the embodiment of the application, when the electronic equipment shoots video, after sending the recording instruction to the wireless earphone, the electronic equipment can receive the audio data collected by the wireless earphone.
In some embodiments, if the wireless headset includes a first wireless headset and a second wireless headset, and the electronic device is connected to the second wireless headset through the first wireless headset. In this case, the audio data received by the electronic device may be audio data transmitted by the first wireless headset. When the first wireless earphone sends the audio data to the electronic device, the audio data collected by the first wireless earphone and the audio data collected by the second wireless earphone can be combined into an audio data packet, and the audio data packet is sent to the electronic device.
Optionally, the audio data acquired by the first wireless earphone and the second wireless earphone respectively include a time stamp, and the first wireless earphone may combine the audio data with the same time stamp in the audio data acquired by the first wireless earphone and the second wireless earphone respectively according to the time stamp included in the audio data, so as to obtain an audio data packet for sending to the electronic device.
In other embodiments, if the wireless earphone includes a first wireless earphone and a second wireless earphone, and the electronic device is directly connected to the first wireless earphone and the second wireless earphone, the audio data collected by the first wireless earphone and the audio data collected by the second wireless earphone may be directly received.
Step S140: and generating shooting video based on the image acquired by the camera and the audio data.
In the embodiment of the application, in the process of video shooting by the electronic equipment, shooting video can be generated according to the image acquired by the camera and the received audio data acquired by the wireless earphone. It can be understood that, before the recording instruction is sent to the wireless earphone, the connection between the electronic device and the wireless earphone is in an active mode, so that a larger time difference exists between the time point when the wireless earphone receives the control instruction and collects the audio data and the time collection point of the video data at the mobile phone end, the situation of audio loss in the time difference can not occur, and the problem of asynchronous audio and video in the time period can not occur.
In some embodiments, the electronic device collects images through the camera, a time stamp may be added to the collected image data, and a time stamp may also be added to the collected audio data when the wireless headset collects audio data. The electronic equipment encapsulates the image data and the audio data with the same time stamp based on the time stamp of the image data and the time stamp of the audio data, so that synchronization of the image acquired by the camera and the audio data is realized, and a shot video is obtained.
In one possible implementation, since the electronic device and the wireless earphone each have their own system time, and the electronic device adds a timestamp to the acquired image based on the system time of the electronic device, and the wireless earphone adds a timestamp to the acquired audio data based on the system time of the wireless earphone, the system time of the electronic device is updated with the network frequently, but the system time of the wireless earphone is updated relatively less frequently, so the system time of the electronic device is easy to be different from the system time of the wireless earphone. Therefore, in this embodiment, the electronic device may acquire a time offset between the system time of the electronic device and the system time of the wireless headset, and when generating a video according to the acquired image and the received audio data, the time offset may be used to calibrate the timestamp of the image or the timestamp of the audio data, so that the timestamp of the image and the timestamp of the audio data are the timestamps under the same system time reference, and when packaging to generate the video, the calibrated timestamp may be used to process the image data and the audio data with the same timestamp, so as to realize synchronization of the image acquired by the camera and the audio data, and generate the shot video, so as to ensure accuracy of sound-image synchronization.
In another possible implementation, since the system time of the electronic device is easily different from the system time of the wireless headset, the electronic device may also calibrate the system time of the wireless headset before video capturing so that the system time of the wireless headset is consistent with the system time of the electronic device.
Optionally, the electronic device may obtain a time offset between the system time of the electronic device and the system time of the wireless headset through testing, and then send the time offset to the wireless headset, and after receiving the time offset, the wireless headset may update the system time according to the time offset, so that the system time of the wireless headset is consistent with the system time of the electronic device. Therefore, the time stamp of the image shot by the electronic equipment and the time stamp of the audio data can be the time stamp of the same system time reference, and further the time stamp of the image and the time stamp of the audio data can be utilized to process the image data and the audio data with the same time stamp when the video is generated in a packaged mode, so that the accuracy of audio-video synchronization can be ensured.
Optionally, the electronic device may calibrate the system time of the wireless earphone when detecting that the current display interface is a shooting interface, so that the system time of the wireless earphone is consistent with the system time of the electronic device; the electronic device can calibrate the system time of the wireless earphone after the connection with the wireless earphone is established, so that the system time of the wireless earphone is consistent with the system time of the electronic device, and therefore the system time of the wireless earphone is calibrated before video shooting of the electronic device is achieved.
According to the video shooting method provided by the embodiment of the application, under the condition that the shooting interface is displayed on the electronic equipment, the connection between the electronic equipment and the wireless earphone is controlled to be changed from the monitoring mode to the active mode, that is, the connection between the electronic equipment and the wireless earphone is controlled to be in the active mode before video shooting is carried out, so that delay of transmission of a recording instruction to the wireless earphone is avoided, the speed of starting recording by the wireless earphone is further improved, and the situation of asynchronous sound and picture is avoided; in addition, the connection between the electronic device and the wireless earphone is controlled to be in the active mode only when the current display interface of the electronic device is a shooting interface, so that only limited power consumption increment can be generated.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video shooting method according to another embodiment of the application. The video shooting method is applied to the electronic equipment, the electronic equipment comprises a camera, and the electronic equipment is connected with the wireless earphone. The following will describe the flowchart shown in fig. 4 in detail, and the video capturing method specifically may include the following steps:
step S210: and under the condition that the current display interface is a shooting interface, if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, sending a heartbeat data packet to the wireless earphone at preset time intervals so as to control the connection between the electronic equipment and the wireless earphone to be in an active mode.
In the embodiment of the application, if the electronic device detects that the current display interface is the shooting interface and the connection between the electronic device and the wireless earphone is in the monitoring mode, the heartbeat data packet can be sent to the wireless earphone at preset time intervals, and the current connection can be exited from the monitoring mode and enter the active mode due to the sending of the heartbeat data packet. The heartbeat packet is a self-defined command word for informing the opposite side of the self state of the equipment at regular time, and is sent according to a certain time interval, and in the Bluetooth protocol, if the Bluetooth connection is in a monitoring mode, the mode of the heartbeat packet can request the Bluetooth chip to exit the monitoring mode and enter an active mode.
In some embodiments, the preset duration may be less than or equal to a specified duration for entering the listening mode when no data is transmitted as specified in the bluetooth protocol. As can be appreciated, in the bluetooth protocol, when the connection between the electronic device and the wireless headset is in the active mode, and when the data transmission is completed, there is no data transmission within a certain time (i.e., the specified duration), the bluetooth chip is requested to enter the listening mode. Therefore, under the condition that the current interface of the electronic equipment is in a shooting interface, the connection between the electronic equipment and the wireless earphone is in an active mode for a long time, and delay in sending a recording instruction to the wireless earphone when the electronic equipment shoots videos is avoided.
Step S220: and under the condition that the current display interface is switched to other interfaces, controlling the connection between the electronic equipment and the wireless earphone to be in a monitoring mode.
In the embodiment of the application, if the electronic device detects that the current display interface is switched from the shooting interface to other interfaces under the condition that the current display interface is the shooting interface, the connection between the electronic device and the wireless earphone can be controlled to be in a monitoring mode. The other interfaces are other interfaces except the shooting interface, that is, when the electronic device exits the shooting interface, the connection between the electronic device and the wireless earphone can be controlled to be in a monitoring mode. It can be appreciated that in the case that the current interface of the electronic device switches the other interfaces, the user cannot take video with the electronic device at this time, so that the connection between the two interfaces can be controlled to be in the listening mode, so as to reduce power consumption.
In some embodiments, when the electronic device detects that the current interface is switched to another interface, the sending of the heartbeat packet to the wireless headset may be stopped, so that after no data is sent between the electronic device and the wireless headset for more than a certain period of time, the connection between the electronic device and the wireless headset enters a listening mode.
In some embodiments, the electronic device may perform timing when detecting that the current interface is switched to another interface, and compare the timing duration with the target duration; if the timing duration does not reach the target duration, the duration indicating that the shooting interface is exited is shorter, at this time, the user may only briefly control the electronic device to switch to other interfaces, and may control the electronic device to enter the shooting interface to perform video shooting, so that the connection between the electronic device and the wireless earphone may still be kept in an active mode at this time; if the time length reaches the target time length, the time length which indicates that the shooting interface is exited is longer, and at the moment, the user is unlikely to control the electronic equipment to enter the shooting interface to shoot the video, so that the connection between the electronic equipment and the wireless earphone can be controlled to be in a monitoring mode.
Step S230: and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images.
In the embodiment of the present application, step S230 may refer to the content of other embodiments, which is not described herein.
Step S240: and stopping sending the heartbeat data packet to the wireless earphone.
In the embodiment of the application, after the electronic equipment starts video shooting, as the wireless earphone can collect audio data in the video shooting process and send the collected audio data to the electronic equipment in real time, the connection between the electronic equipment and the wireless earphone can be in an acquisition mode for a long time, so the electronic equipment can stop sending a heartbeat data packet to the wireless earphone after responding to video shooting operation, sending a recording instruction to the wireless earphone and controlling the camera to start image collection. Therefore, after video shooting is started, communication resources are not occupied due to the sending of the heartbeat data packet, the stability of data transmission in the video shooting process is effectively ensured, and the resource occupation and the power consumption of the electronic equipment can be saved.
Step S250: and receiving the audio data collected by the wireless earphone.
Step S260: and generating shooting video based on the image acquired by the camera and the audio data.
In the embodiment of the present application, step S250 and step S260 may refer to the content of other embodiments, which are not described herein.
According to the video shooting method provided by the embodiment of the application, under the condition that the electronic equipment detects that the shooting interface is displayed, heartbeat data packets are sent to the wireless earphone at preset time intervals, so that the connection between the electronic equipment and the wireless earphone is in an active mode in advance, delay of transmission of a recording instruction to the wireless earphone can be avoided when video shooting is started, the speed of starting recording by the wireless earphone is further improved, and the situation that sound and pictures are asynchronous is avoided; in addition, after the electronic equipment starts shooting the video, the electronic equipment stops sending the heartbeat data packet to the wireless earphone, so that the resource occupation and the power consumption of the electronic equipment can be reduced.
Referring to fig. 5, fig. 5 is a flowchart illustrating a video shooting method according to another embodiment of the application. The video shooting method is applied to the electronic equipment, the electronic equipment comprises a camera, and the electronic equipment is connected with the wireless earphone. The following will describe the flowchart shown in fig. 5 in detail, and the video capturing method specifically may include the following steps:
step S310: and under the condition that the current display interface is a shooting interface, acquiring the wearing state of the wireless earphone.
In the embodiment of the application, when the electronic device is connected with the wireless earphone and the current display interface is a shooting interface, the wearing state of the wireless earphone can be obtained, so that whether the connection between the electronic device and the wireless earphone is controlled to be in an active mode or not can be determined according to the wearing state of the wireless earphone. As can be appreciated, in the case that a user usually shoots a video by using an electronic device and records the video by using a wireless earphone, the user usually holds the electronic device to collect an image, and the wireless earphone is worn on the ear of the user to collect an audio, so that the electronic device can also determine the wearing state of the wireless earphone when the shooting interface is displayed, and if the wireless earphone is in the wearing state, the user is indicated that the user may shoot the video by using the electronic device; otherwise, if the wireless earphone is not in a wearing state, the current user is unlikely to take video shooting by using the electronic equipment.
In some embodiments, when detecting that the current display interface is a shooting interface, the electronic device may send a wear detection instruction to the wireless headset, so as to instruct the wireless headset to detect a wear state of the wireless headset, and feed back the wear state to the electronic device; the wireless earphone can also detect the wearing state in real time, and when the wireless earphone is in the wearing state, state information of the wearing state is sent to the electronic equipment to indicate that the electronic equipment is in the wearing state, and when the electronic equipment does not receive the state information sent by the wireless earphone, the wireless earphone can be determined not to be in the wearing state.
In one possible embodiment, the housing of the wireless headset may be provided with a wear detection module, which is disposed on a designated surface of the housing of the wireless headset, the designated surface being a surface of the headset head that contacts the concha cavity of the human ear when the wireless headset is worn. Optionally, a black round hole is formed in the designated surface, a wearing detection module is assembled in the round hole, the wearing detection module can be a light sensor and comprises a light emitting unit and a light sensing unit, the light emitting unit can be an LED lamp, the LED lamp emits infrared light, the infrared light passes through a prism sheet on the round hole and irradiates outside the earphone, if an opaque object is blocked in front, most of the light can be reflected back, and the light sensing unit judges whether an object is blocked according to the intensity of the reflected light to infer whether the wearing state is achieved. Similarly, the second wireless earphone may also be provided with a wearing detector, and determine whether the wireless earphone is in a wearing state based on the wearing detector. Of course, the specific type of the wearing detector is not limited, and the wearing detector may be a touch sensor, a pressure sensor, or the like.
In this embodiment, a state threshold corresponding to the wearing detection module may be preset, and based on a detection value detected by the wearing detection module, the state threshold may be compared, and whether the wireless earphone is in a wearing state may be determined according to a comparison result. For example, when the wearing detection module is a light sensor, the state threshold is a set light intensity threshold, and if the light intensity detected by the light sensor is lower than the set light intensity threshold, the wireless earphone is determined to be in a wearing state; if the light intensity detected by the light sensor is greater than or equal to the set light intensity threshold, the wireless earphone is determined not to be in a wearing state. The wireless earphone can feed back the determined wearing state information to the electronic equipment, so that the electronic equipment can know whether the wireless earphone is in a wearing state or not.
Step S320: and if the wireless earphone is in a wearing state and the connection between the electronic equipment and the wireless earphone is in a monitoring mode, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode.
In the embodiment of the application, when the current display interface of the electronic device is a shooting interface, if the wireless earphone is in a wearing state, the user is indicated that the user may take video by using the electronic device, so that when the connection between the electronic device and the wireless earphone is in a monitoring mode, the connection can be controlled to be switched into an active mode, so that the connection between the electronic device and the wireless earphone is in the active mode in advance. Of course, if the connection of the electronic device and the wireless headset is in the active mode at this time, the electronic device may not perform the processing.
Step S330: and outputting preset prompt information, wherein the preset prompt information is used for prompting to reduce the distance between the electronic equipment and the wireless earphone.
In the embodiment of the application, when the current display interface of the electronic device is a shooting interface and the wireless earphone is in the wearing state, after the connection between the electronic device and the wireless earphone is controlled to be in the active mode, the electronic device and the wireless earphone may be far away due to the wearing state of the wireless earphone, and when the distance is far away, video shooting is performed subsequently, and when a recording instruction is sent to the wireless earphone, the transmission duration of the recording instruction is increased. Therefore, in the embodiment of the application, the electronic device can output the preset prompt information to prompt the user to reduce the distance between the electronic device and the wireless earphone, so that the user can pick up the wireless earphone according to the prompt information, the wireless earphone is in an unworn state, and the wireless earphone is close to the electronic device, thereby reducing the distance between the electronic device and the wireless earphone, and further, when the recording instruction is sent later, the recording instruction can be sent to the wireless earphone more quickly. After the video shooting is started subsequently and a recording instruction is sent to the wireless earphone, the user wears the wireless earphone on the ear to shoot the video in a mode that the user is used to, namely, the user holds the electronic equipment to collect images, and the wireless earphone wears the wireless earphone on the ear to collect audio.
In some embodiments, the electronic device may output the preset prompting information in a pop-up window prompting manner in the shooting interface; the electronic device can also output prompt voice through the wireless earphone to prompt the user to reduce the distance between the electronic device and the wireless earphone. Of course, the specific manner of outputting the preset prompt information by the electronic device is not limited.
In some embodiments, it is contemplated that the distance between the wireless headset and the electronic device is related to where the user holds the electronic device when the user wears the wireless headset, i.e., the wireless headset may be closer to the electronic device or further from the electronic device. Thus, the electronic device may determine a distance between the electronic device and the wireless headset based on a received signal strength corresponding to a received signal transmitted by the wireless headset; then comparing the determined distance with a preset distance, and according to a comparison result, if the distance is larger than the preset distance, indicating that the current wireless earphone is far away from the electronic equipment, and the transmission duration of the recording instruction can be influenced, so that preset prompt information can be output; otherwise, if the distance is not greater than the preset distance, the current wireless earphone is close to the electronic equipment, so that the preset prompt information can not be output.
In one possible implementation, the electronic device may determine a received signal strength indication (Received Signal Strength Indication, RSSI) from a received signal transmitted by the wireless headset, thereby determining a distance to the wireless headset from the RSSI. The ranging equation according to RSSI is as follows:
d represents the distance between the electronic device and the wireless earphone, RSSI represents the absolute value of RSSI corresponding to the signal sent by the wireless earphone and received by the electronic device, a represents the absolute value of RSSI corresponding to the broadcast signal received by the electronic device under the reference distance, and B is the path loss factor. It can be seen that the distance between the electronic device and the wireless headset is inversely proportional to the RSSI, the greater the RSSI, the smaller the distance between the electronic device and the wireless headset; the smaller the RSSI, the greater the distance between the electronic device and the wireless headset.
Step S340: and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images.
Step S350: and receiving the audio data collected by the wireless earphone.
Step S360: and generating shooting video based on the image acquired by the camera and the audio data.
In the embodiment of the present application, the steps S340 to S360 may refer to the content of other embodiments, which are not described herein.
According to the video shooting method provided by the embodiment of the application, the connection between the electronic equipment and the wireless earphone is controlled to be in the active mode in advance and keep the active mode, so that when video shooting is started, delay of transmission of a recording instruction to the wireless earphone can be avoided, the speed of starting recording by the wireless earphone is further improved, and the situation that sound and pictures are asynchronous is avoided; in addition, when the current display interface of the electronic equipment is a shooting interface and the wireless earphone is in a wearing state, the connection between the electronic equipment and the wireless earphone is controlled to be in an active mode, so that the power consumption of the electronic equipment can be reduced; and before video shooting, prompt information is also output to prompt a user to reduce the distance between the wireless earphone and the electronic equipment, so that the transmission duration of a subsequent recording instruction is reduced, the wireless earphone can receive the recording instruction faster, and sound and picture synchronization is further ensured.
Referring to fig. 6, fig. 6 is a flowchart illustrating a video capturing method according to still another embodiment of the present application. The video shooting method is applied to the electronic equipment, the electronic equipment comprises a camera, and the electronic equipment is connected with the wireless earphone. The following will describe the flowchart shown in fig. 6 in detail, and the video capturing method specifically may include the following steps:
Step S410: and if the current display interface is a shooting interface, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode if the connection between the electronic equipment and the wireless earphone is in a monitoring mode.
In the embodiment of the present application, step S410 may refer to the content of the foregoing embodiment, and is not described herein.
Step S420: and increasing the Bluetooth transmitting power of the electronic equipment.
In the embodiment of the application, when the current display interface of the electronic equipment is a shooting interface, the Bluetooth transmitting power of the electronic equipment can be increased besides controlling the connection between the electronic equipment and the wireless earphone to be in an active mode, so that the Bluetooth signal intensity which can be received by the wireless earphone is enhanced, and the recording instruction can be more quickly transmitted to the wireless earphone when the electronic equipment sends the recording instruction, thereby avoiding the situation of asynchronous sound and picture.
In some embodiments, considering that the bluetooth signal strength that the wireless headset can receive is related to the distance of the wireless headset from the electronic device, the electronic device may determine the distance between the electronic device and the wireless headset based on the received signal strength corresponding to the received signal transmitted by the wireless headset; then comparing the determined distance with the target distance, and according to the comparison result, if the determined distance is larger than the target distance, indicating that the distance between the current wireless earphone and the electronic equipment is lower in Bluetooth receiving signal strength, so that data transmission between the two is affected, and therefore, in the case, the Bluetooth transmitting power of the electronic equipment can be increased; otherwise, if the determined distance is not greater than the target distance, the Bluetooth transmission power of the electronic device may not be increased.
Step S430: and estimating the transmission time length of the recording instruction transmitted to the wireless earphone.
In the embodiment of the application, before the electronic equipment shoots the video, the transmission time length of the recording instruction transmitted to the wireless earphone can be estimated before the recording instruction is sent to the wireless earphone, so that the time point of image acquisition by the camera of the electronic equipment is controlled according to the transmission time length, and the situation that the audio is lost in the video shot at the beginning of video shooting can be further avoided.
In some embodiments, referring to fig. 7, the estimating, by the electronic device, a transmission duration of the recording instruction to the wireless headset may include:
step S431: and sending a test instruction to the wireless earphone, and recording the time when the test instruction is sent as the first time, wherein the data volume of the test instruction is matched with the data volume of the recording instruction.
In this embodiment, when the electronic device transmits the test instruction, the time when the test instruction is transmitted to the wireless headset may be recorded, and recorded as the first time. And the data volume of the test instruction is matched with the data volume of the recording instruction so as to estimate the transmission time length of the recording instruction.
Step S432: and receiving a response instruction fed back by the wireless earphone based on the test instruction, a second time when the wireless earphone receives the test instruction, and a third time recorded when the response instruction is sent.
In this embodiment, when the wireless earphone receives the test instruction, the wireless earphone may feed back a response instruction to the electronic device, and when the wireless earphone may feed back the response instruction to the electronic device, the wireless earphone may feed back a second time when the wireless earphone receives the test instruction and a time when the wireless earphone sends the response instruction (i.e., a third time) to the electronic device. Correspondingly, the electronic device can receive a response instruction fed back by the wireless earphone, the second time and the third time. The data amount of the response instruction may be matched with the data amount of the test instruction, for example, the data amount of the response instruction may be the same as the data amount of the test instruction, or a difference between the two may be within a preset range.
Step S243: and acquiring a fourth time recorded when the response instruction is received.
In this embodiment, when the electronic device receives the response instruction, the time when the response instruction is received may be determined and recorded as the fourth time.
Step S434: and determining the transmission time length of the test instruction transmitted to the wireless earphone based on the first time, the second time, the third time and the fourth time, and taking the transmission time length as the estimated transmission time length of the recording instruction transmitted to the wireless earphone.
In this embodiment, after the electronic device obtains the first time (i.e., the time when the recording instruction is sent), the second time (i.e., the time when the wireless headset receives the recording instruction), the third time (i.e., the time when the wireless headset sends the response instruction), and the fourth time (i.e., the time when the response instruction is received), the transmission duration of the recording instruction to the wireless headset may be determined based on the first time, the second time, the third time, and the fourth time. It can be understood that the transmission duration of the test instruction and the transmission duration of the response instruction can be regarded as the same, and the sum of the transmission duration of the test instruction and the transmission duration of the response instruction can be determined by using the first time, the second time, the third time and the fourth time, and half of the sum is the transmission duration of the test instruction and the transmission duration of the response instruction.
In one possible implementation manner, determining a transmission duration of the test instruction to the wireless earphone based on the first time, the second time, the third time and the fourth time may include: acquiring a difference value between the fourth time and the first time as a first difference value, and a difference value between the third time and the second time as a second difference value; acquiring a difference value of the first difference value and the second difference value as a third difference value; and determining the transmission time length of the recording instruction to the wireless earphone based on the third difference value. It can be understood that the fourth time and the first time are both times under the system time reference of the electronic device, and the difference value between the fourth time and the first time represents a time period from when the test instruction is sent to when the response instruction is received; the second time and the third time are both the time under the system time reference of the wireless earphone, and the difference value between the third time and the second time represents the time spent by the wireless earphone from the receiving of the test instruction to the sending of the response instruction; in addition, the time length from the time when the electronic device sends the test instruction to the time when the response instruction is received is formed by the transmission time length of the recording instruction, the time taken by the wireless earphone to receive the test instruction and feed back the response instruction, and the transmission time length of the response instruction, so that the difference between the first difference and the second difference is the sum of the transmission time length of the test instruction and the transmission time length of the response instruction, and half of the sum can be used as the transmission time length of the test instruction transmitted to the wireless earphone under the condition that the transmission time length of the test instruction and the transmission time length of the response instruction are regarded as the same.
Illustratively, the electronic device records as T1 when sending the test instruction; when the test instruction is transmitted to the wireless earphone, the wireless earphone records T2; based on the test instruction, the wireless earphone feeds back the time recorded when responding to the instruction to be T3; and when the electronic equipment receives the response instruction, the recorded time is T4. In the process from T1 to T4 (both under the system time reference of the electronic device), the process of transmitting the test instruction to the wireless earphone, the process of transmitting the test instruction to the electronic device by the wireless earphone based on the test instruction, and the process of transmitting the response instruction to the electronic device are included, so that when the transmission time length of the test instruction is regarded as the same as the transmission time length of the response instruction, the transmission time length of the test instruction is: t= ((T4-T1) - (T3-T2))/2.
Step S440: and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to start image acquisition after the transmission time length.
In the embodiment of the application, after the electronic equipment estimates the transmission time of the recording instruction to the wireless earphone, the recording instruction can be stored. When the electronic equipment detects the video shooting operation, the transmission time length can be read, a recording instruction is sent to the wireless earphone in response to the video shooting operation, and the camera is controlled to start image acquisition after the transmission time length. That is, the time point when the electronic device controls the camera to collect images is later than the time point when the electronic device sends the recording instruction to the wireless earphone, so that the time point when the wireless earphone receives the recording instruction is consistent with the time point when the electronic device controls the camera to collect images, and further the situation that audio is lost in a video shot at the beginning of video shooting can be avoided.
Step S450: and receiving the audio data collected by the wireless earphone.
Step S460: and generating shooting video based on the image acquired by the camera and the audio data.
In the embodiment of the present application, the step S450 and the step S460 may refer to the contents of other embodiments, which are not described herein.
According to the video shooting method provided by the embodiment of the application, under the condition that the current display interface of the electronic equipment is the shooting interface, the connection between the electronic equipment and the wireless earphone is controlled to be in an active mode in advance and keep the active mode, so that when video shooting starts, delay of transmission of a recording instruction to the wireless earphone can be avoided, the speed of starting recording by the wireless earphone is further improved, and the situation that sound and picture are asynchronous is avoided; in addition, when the current display interface of the electronic equipment is a shooting interface, the connection between the electronic equipment and the wireless earphone is controlled to be in an active mode, so that the power consumption of the electronic equipment can be reduced; and before video shooting is carried out, the transmission time length of the recording instruction transmitted to the wireless earphone is estimated, so that when the video shooting operation is responded, the recording instruction is sent to the wireless earphone, and the camera is controlled to start image acquisition after the transmission time length, so that the time point of the recording instruction received by the wireless earphone is consistent with the time point of the image acquisition carried out by the camera controlled by the electronic equipment, and the situation that audio is absent in video shot at the beginning of video shooting can be avoided.
It should be noted that the foregoing embodiments may also be combined with each other, for example, when the electronic device is in the shooting area on the current display interface and the wireless headset is in the wearing state, after controlling the connection between the electronic device and the wireless headset to be in the active mode, the bluetooth transmitting power may be increased, and meanwhile, a preset prompting message may be output, so as to prompt the user to take down the wireless headset and reduce the distance between the electronic device and the wireless headset.
Referring to fig. 8, a block diagram of a video capturing apparatus 400 according to an embodiment of the application is shown. The video shooting device 400 is applied to the electronic equipment, and the electronic equipment comprises a camera, and is connected with a wireless earphone. The video photographing apparatus 400 includes: a mode control module 410, a shooting initiation module 420, an audio reception module 430, and a video generation module 440. The mode control module 410 is configured to control, when the current display interface is a shooting interface, the connection between the electronic device and the wireless headset to be in an active mode if the connection between the electronic device and the wireless headset is in a listening mode; the shooting starting module 420 is configured to respond to a video shooting operation, send a recording instruction to the wireless earphone, and control the camera to perform image acquisition; the audio receiving module 430 is configured to receive audio data collected by the wireless earphone; the video generating module 440 is configured to generate a captured video based on the image acquired by the camera and the audio data.
In some implementations, the mode control module 410 may be specifically configured to: and under the condition that the current display interface is a shooting interface, if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, sending a heartbeat data packet to the wireless earphone at preset time intervals so as to control the connection between the electronic equipment and the wireless earphone to be in an active mode.
In a possible implementation manner, the mode control module 410 may be further configured to stop sending the heartbeat packet to the wireless headset after the recording command is sent to the wireless headset in response to the shooting operation and the camera is controlled to perform image acquisition.
In some embodiments, the mode control module 410 may be further configured to, when the current display interface is a shooting interface, control, after controlling the connection between the electronic device and the wireless headset to be in the active mode if the connection between the electronic device and the wireless headset is in the listening mode, and when the current display interface is switched to another interface, control the connection between the electronic device and the wireless headset to be in the listening mode.
In some implementations, the mode control module 410 may be specifically configured to: acquiring the wearing state of the wireless earphone under the condition that the current display interface is a shooting interface; and if the wireless earphone is in a wearing state, and if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode.
In one possible implementation, the video capture device 400 may further include a hint output module. The prompt output module is used for outputting preset prompt information before responding to shooting operation, sending a recording instruction to the wireless earphone and controlling the camera to acquire images, wherein the preset prompt information is used for prompting to reduce the distance between the electronic equipment and the wireless earphone.
Alternatively, the prompt output module may be specifically configured to: determining a distance between the electronic equipment and the wireless earphone based on received signal strength corresponding to a received signal sent by the wireless earphone; and if the distance is greater than the preset distance, outputting preset prompt information.
In some implementations, the video capture device 400 may also include a power control module. The power control module may be configured to increase a bluetooth transmit power of the electronic device before the responding to the video capturing operation, sending a recording instruction to the wireless headset, and controlling the camera to perform image capturing.
In some embodiments, the video capture device 400 may further include a duration estimation module. The duration estimation module is used for estimating the transmission duration of the recording instruction transmitted to the wireless earphone before the response to the shooting operation sends the recording instruction to the wireless earphone and controls the camera to acquire the image. In this manner, the shooting start module may be specifically configured to: and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to start image acquisition after the transmission time length.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus and modules described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
In several embodiments provided by the present application, the coupling of the modules to each other may be electrical, mechanical, or other.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules.
In summary, according to the scheme provided by the application, if the current display interface of the electronic device is a shooting interface and the connection between the electronic device and the wireless earphone is in the monitoring mode, the connection between the electronic device and the wireless earphone is controlled to be in the active mode, then a recording instruction is sent to the wireless earphone in response to video shooting operation, the camera is controlled to collect images, audio data collected by the wireless earphone is received, and shooting video is generated based on the images and the audio data collected by the camera. Therefore, under the condition that the electronic equipment displays a shooting interface, the connection between the electronic equipment and the wireless earphone is controlled to be changed into an active mode from a monitoring mode, so that delay of transmission of a recording instruction to the wireless earphone is avoided, the speed of starting recording by the wireless earphone is further improved, and the situation that sound and picture are not synchronous is avoided.
Referring to fig. 9, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be an electronic device capable of running an application program, such as a smart phone, a tablet computer, a smart watch, an electronic book, etc. The electronic device 100 of the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more applications configured to perform the method as described in the foregoing method embodiments.
Processor 110 may include one or more processing cores. The processor 110 utilizes various interfaces and lines to connect various portions of the overall electronic device 100, perform various functions of the electronic device 100, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 110 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), a graphics processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 110 and may be implemented solely by a single communication chip.
The Memory 120 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Memory 120 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the electronic device 100 in use (e.g., phonebook, audiovisual data, chat log data), and the like.
Referring to fig. 10, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 800 has stored therein program code which can be invoked by a processor to perform the methods described in the method embodiments described above.
The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 comprises a non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 800 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be appreciated by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (11)

1. A video capturing method, applied to an electronic device, the electronic device including a camera, the electronic device being connected to a wireless headset, the method comprising:
acquiring the wearing state of the wireless earphone under the condition that the current display interface is a shooting interface;
if the wireless earphone is in a wearing state, and if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode;
responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images;
Receiving audio data collected by the wireless earphone;
and generating shooting video based on the image acquired by the camera and the audio data.
2. The method of claim 1, wherein, in the case where the current display interface is a shooting interface, if the connection between the electronic device and the wireless headset is in the listening mode, controlling the connection between the electronic device and the wireless headset to be in the active mode includes:
and under the condition that the current display interface is a shooting interface, if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, sending a heartbeat data packet to the wireless earphone at preset time intervals so as to control the connection between the electronic equipment and the wireless earphone to be in an active mode.
3. The method of claim 2, wherein after said sending a sound recording instruction to said wireless headset and controlling said camera for image acquisition in response to a photographing operation, said method further comprises:
and stopping sending the heartbeat data packet to the wireless earphone.
4. The method of claim 1, wherein in the case where the current display interface is a photographing interface, if the connection between the electronic device and the wireless headset is in a listening mode, after controlling the connection between the electronic device and the wireless headset to be in an active mode, the method further comprises:
And under the condition that the current display interface is switched to other interfaces, controlling the connection between the electronic equipment and the wireless earphone to be in a monitoring mode.
5. The method of claim 1, wherein prior to said sending a sound recording instruction to said wireless headset and controlling said camera for image acquisition in response to a capture operation, said method further comprises:
and outputting preset prompt information, wherein the preset prompt information is used for prompting to reduce the distance between the electronic equipment and the wireless earphone.
6. The method of claim 5, wherein outputting the preset hint information comprises:
determining a distance between the electronic equipment and the wireless earphone based on received signal strength corresponding to a received signal sent by the wireless earphone;
and if the distance is greater than the preset distance, outputting preset prompt information.
7. The method of any of claims 1-6, wherein prior to said sending a sound recording instruction to the wireless headset and controlling the camera for image acquisition in response to a video capture operation, the method further comprises:
and increasing the Bluetooth transmitting power of the electronic equipment.
8. The method of any of claims 1-6, wherein prior to said sending a sound recording instruction to the wireless headset and controlling the camera for image acquisition in response to a capture operation, the method further comprises:
estimating the transmission time length of the recording instruction transmitted to the wireless earphone;
the response to the video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to acquire images, comprises:
and responding to video shooting operation, sending a recording instruction to the wireless earphone, and controlling the camera to start image acquisition after the transmission time length.
9. A video capturing apparatus, characterized by being applied to an electronic device, the electronic device including a camera, the electronic device being connected to a wireless headset, the apparatus comprising: a mode control module, a shooting starting module, an audio receiving module and a video generating module, wherein,
the mode control module is used for acquiring the wearing state of the wireless earphone under the condition that the current display interface is a shooting interface; if the wireless earphone is in a wearing state, and if the connection between the electronic equipment and the wireless earphone is in a monitoring mode, controlling the connection between the electronic equipment and the wireless earphone to be in an active mode;
The shooting starting module is used for responding to video shooting operation, sending a recording instruction to the wireless earphone and controlling the camera to acquire images;
the audio receiving module is used for receiving audio data acquired by the wireless earphone;
the video generation module is used for generating shooting video based on the image acquired by the camera and the audio data.
10. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-8.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a program code, which is callable by a processor for executing the method according to any one of claims 1-8.
CN202210572112.9A 2022-05-24 2022-05-24 Video shooting method, device, electronic equipment and storage medium Active CN115022536B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210572112.9A CN115022536B (en) 2022-05-24 2022-05-24 Video shooting method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210572112.9A CN115022536B (en) 2022-05-24 2022-05-24 Video shooting method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115022536A CN115022536A (en) 2022-09-06
CN115022536B true CN115022536B (en) 2023-10-03

Family

ID=83069545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210572112.9A Active CN115022536B (en) 2022-05-24 2022-05-24 Video shooting method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115022536B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650663A (en) * 2018-03-23 2018-10-12 珠海慧联科技有限公司 A kind of bluetooth module and its clock work method of low clock request
US10944154B1 (en) * 2020-09-24 2021-03-09 Bestechnic (Shanghai) Co., Ltd. Wireless audio system and method for wirelessly communicating audio information using the same
CN112770212A (en) * 2021-01-07 2021-05-07 深圳市天诺泰科技有限公司 Wireless earphone, video recording system and method, and storage medium
CN113542479A (en) * 2021-07-26 2021-10-22 Oppo广东移动通信有限公司 Recording method, recording device, wireless earphone and storage medium
CN113810589A (en) * 2020-06-11 2021-12-17 华为技术有限公司 Electronic device, video shooting method and medium thereof
CN114125258A (en) * 2020-08-26 2022-03-01 华为技术有限公司 Video processing method and electronic equipment
CN114422710A (en) * 2022-03-29 2022-04-29 荣耀终端有限公司 Video recording control method for electronic equipment, electronic equipment and readable medium
CN114449391A (en) * 2022-02-08 2022-05-06 维沃移动通信有限公司 Recording method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108650663A (en) * 2018-03-23 2018-10-12 珠海慧联科技有限公司 A kind of bluetooth module and its clock work method of low clock request
CN113810589A (en) * 2020-06-11 2021-12-17 华为技术有限公司 Electronic device, video shooting method and medium thereof
CN114125258A (en) * 2020-08-26 2022-03-01 华为技术有限公司 Video processing method and electronic equipment
US10944154B1 (en) * 2020-09-24 2021-03-09 Bestechnic (Shanghai) Co., Ltd. Wireless audio system and method for wirelessly communicating audio information using the same
CN112770212A (en) * 2021-01-07 2021-05-07 深圳市天诺泰科技有限公司 Wireless earphone, video recording system and method, and storage medium
CN113542479A (en) * 2021-07-26 2021-10-22 Oppo广东移动通信有限公司 Recording method, recording device, wireless earphone and storage medium
CN114449391A (en) * 2022-02-08 2022-05-06 维沃移动通信有限公司 Recording method and device and electronic equipment
CN114422710A (en) * 2022-03-29 2022-04-29 荣耀终端有限公司 Video recording control method for electronic equipment, electronic equipment and readable medium

Also Published As

Publication number Publication date
CN115022536A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN113542479B (en) Recording method, recording device, wireless earphone and storage medium
JP2017528009A (en) Method and apparatus for playing multimedia files
CN107621933B (en) Audio playing method and device and related medium product
CN108600778B (en) Media stream transmitting method, device, system, server, terminal and storage medium
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
EP4047471A1 (en) Audio data processing method, server, and storage medium
WO2023061127A1 (en) Communication method and apparatus, earphone set, and computer readable medium
WO2023273701A1 (en) Coding control method and apparatus, wireless earphone, and storage medium
CN105657612A (en) Audio and video play method and system, headset and mobile terminal
KR20180110033A (en) Multimedia information reproduction method and system, standardization server, live broadcasting terminal
CN115022536B (en) Video shooting method, device, electronic equipment and storage medium
WO2023231787A9 (en) Audio processing method and apparatus
CN115022766B (en) Audio data playing method and equipment
CN109120298B (en) Earphone far-field interaction method, earphone far-field interaction accessory and wireless earphone
CN115022537B (en) Video shooting method, device, electronic equipment and storage medium
CN109120297B (en) Earphone far-field interaction method, earphone far-field interaction accessory and wireless earphone
CN112770149B (en) Video processing method, device, terminal and storage medium
CN114422897A (en) Audio processing method and device, electronic equipment and storage medium
CN113905302A (en) Method and device for triggering prompt message and earphone
CN113038317B (en) Earphone control method and device, bluetooth earphone and storage medium
CN114501239B (en) Master-slave switching method and device of earphone, bluetooth earphone and storage medium
CN107870758B (en) Audio playing method and device and electronic equipment
CN115499537B (en) Microphone control method and device, mobile terminal and storage medium
US11704088B2 (en) Intelligent control method and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant