CN114554270A - Audio and video playing method and device - Google Patents

Audio and video playing method and device Download PDF

Info

Publication number
CN114554270A
CN114554270A CN202210194810.XA CN202210194810A CN114554270A CN 114554270 A CN114554270 A CN 114554270A CN 202210194810 A CN202210194810 A CN 202210194810A CN 114554270 A CN114554270 A CN 114554270A
Authority
CN
China
Prior art keywords
time
electronic device
audio
duration
delay
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.)
Pending
Application number
CN202210194810.XA
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210194810.XA priority Critical patent/CN114554270A/en
Publication of CN114554270A publication Critical patent/CN114554270A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • H04N21/43072Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen of multiple content streams on the same device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The application discloses an audio and video playing method and device, and belongs to the technical field of communication. The method is applied to a first electronic device and comprises the following steps: receiving a first audio sent by a second electronic device at a first time, wherein the first audio is synchronous with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first time delay duration, and the first time delay duration is a time delay duration of communication between the second electronic device and the first electronic device; and playing the first audio, wherein the first audio and the target video are played synchronously.

Description

Audio and video playing method and device
Technical Field
The application belongs to the technical field of communication, and particularly relates to an audio and video playing method and device.
Background
With the rapid development of multimedia technology, electronic devices around people are more and more abundant, for example, smart televisions, mobile phones, tablet computers and the like, and various video playing requirements of people can be met.
In the related art, when people use electronic equipment to watch videos, people can only select one language audio track to play, and when many people watch videos, the video watching requirements of all users cannot be met, so that the watching experience is influenced.
Disclosure of Invention
The embodiment of the application aims to provide an audio and video playing method and an audio and video playing device, which can solve the problem that when a plurality of people watch videos, the video watching requirements of each user cannot be met.
In a first aspect, an embodiment of the present application provides an audio and video playing method, which is applied to a first electronic device, and the method includes:
receiving a first audio sent by a second electronic device at a first time, wherein the first audio is synchronous with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first time delay duration, and the first time delay duration is a time delay duration of communication between the second electronic device and the first electronic device;
and playing the first audio, wherein the first audio and the target video are played synchronously.
In a second aspect, an embodiment of the present application provides an audio/video playing apparatus, which is applied to a first electronic device, and the apparatus includes:
the first receiving module is used for receiving a first audio sent by a second electronic device at a first time, wherein the first audio is synchronous with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay time, and the first delay time is a time delay time for communication between the second electronic device and the first electronic device;
and the playing module is used for playing the first audio, wherein the first audio and the target video are played synchronously.
In a third aspect, embodiments of the present application provide an electronic device, which includes a processor and a memory, where the memory stores a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product, stored on a storage medium, for execution by at least one processor to implement the method according to the first aspect.
In this embodiment of the application, a first electronic device receives a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration of communication between the second electronic device and the first electronic device. In this way, in this embodiment, the playing time stamp of the first audio is used as a reference, and the first delay time length reflecting the communication delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first delay time length, and thus the first audio output by the first electronic device and the target video displayed by the second electronic device can be played synchronously. And aiming at the sensitivity of human ears to continuous audio signals, the audio and video synchronization is carried out by taking the playing time stamp of the first audio as a reference, so that better audio and video experience can be provided for users.
Drawings
Fig. 1 is a schematic flowchart of an audio/video playing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a principle of determining a first time delay length according to an embodiment of the present application;
fig. 3 is a schematic hardware structure diagram of a first electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an audio/video playing device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
With the rapid development of multimedia technology, electronic devices around people are more and more abundant, for example, smart televisions, mobile phones, tablet computers and the like, and various video playing requirements of people can be met. Audio data for multiple tracks, e.g., different language tracks, may be provided by the electronic device. However, when the electronic device is used to watch video, only one audio track of the audio data can be selected for watching. Therefore, when a plurality of people watch videos, the requirements of each viewer cannot be met, and the user experience is influenced.
In the embodiment, when a plurality of people watch videos, a plurality of electronic devices can be used to play audio data with different audio frequencies to meet different watching requirements of each watcher, so that the user experience is better,
the audio/video playing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
As shown in fig. 1, an embodiment of the present application provides an audio and video playing method applied to a first electronic device, where the method may include steps 1100 to 1200, which are described in detail below.
Step 1100, receiving a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay time, and the first delay time is a time delay time for communication between the second electronic device and the first electronic device.
In this embodiment, the first electronic device may be an electronic device for outputting the first audio. The second electronic device may be an electronic device for displaying the screen content of the target video. The first audio is synchronized with the target video. That is, the video frame of the target video is displayed by the second electronic device, and the first audio corresponding to the target video is played by the first electronic device.
It will be appreciated that a communication connection, such as a bluetooth communication connection, is established between the first electronic device and the second electronic device prior to receiving the first audio transmitted by the second electronic device at the first time. Illustratively, an application program for audio and video synchronous playing is installed in the first electronic device, the application program is started, the second electronic device is added as the electronic device for displaying the video picture, and a communication connection is established with the second electronic device.
In this embodiment, when the first electronic device wirelessly communicates with the second electronic device, a certain time delay exists, which may cause that the first audio output by the first electronic device is asynchronous with the target video displayed by the second electronic device, thereby affecting the viewing experience. Based on the time stamp of the first audio to be played by the first electronic device, the first time delay duration of the communication between the first electronic device and the second electronic device is determined, and the first audio is sent to the first electronic device based on the first time delay duration, so that the first audio and the target video are played synchronously. Illustratively, the second electronic device sends the first audio to the first electronic device at a first time, and plays the target video at a second time, wherein the second time is later than the first time, and a time interval between the second time and the first time is a first delay duration, and the first delay duration may be a delay duration of communication between the first electronic device and the second electronic device.
In this embodiment, the first delay time may be determined by the second electronic device. Please refer to fig. 2, which is a schematic diagram illustrating a principle of determining the first time delay length according to the present embodiment. Specifically, first, a third time length (Δ t) reflecting the self-path delay of the second electronic device is determined3). Specifically, a third test signal is played through the audio output module of the second electronic device, the played third test signal is collected through the audio input device of the second electronic device, and a third duration (Δ t) is determined according to the starting time of playing the third test signal by the second electronic device and the time of collecting the third test signal played by the audio output device by the audio input device of the second electronic device3). It should be noted that the third test signal may be a high-frequency pulse signal, which has better anti-interference performance and can improve the accuracy of the test.
Thereafter, a fourth time duration ([ delta ] t) reflecting the time delay duration of the entire path between the second electronic device and the first electronic device is determined4). Specifically, the first electronic device establishes a communication connection, for example, a bluetooth communication connection, a wireless network communication connection, with the second electronic device. The second electronic equipment sends a fourth test signal to the first electronic equipment, the first electronic equipment receives and plays the fourth test signal, and the fourth test signal played by the first electronic equipment is collected through the audio input device of the second electronic equipment, so that the fourth time length (delta t) is determined according to the moment when the fourth test signal is sent by the second electronic equipment and the moment when the fourth test signal played by the first electronic equipment is collected by the audio input device of the second electronic equipment4). It should be noted that the fourth test signal mayIs an audio signal.
Then, a first time delay duration reflecting the communication time delay between the first electronic device and the second electronic device is determined, that is, a fourth time duration (Δ t) is determined4) And a third duration (Δ t)3) As the first delay time period (t)1=△t4-△t3)。
It should be noted that, when the target video is to be played, the second electronic device may determine the first delay time period based on the communication connection established with the first electronic device. The second electronic device may also determine the first delay time period based on the communication connection established with the first electronic device before playing the target video.
After step 1100, step 1200 is executed to play the first audio, wherein the first audio is played synchronously with the target video.
In this embodiment, the second electronic device may provide audio data corresponding to multiple tracks, for example, audio data corresponding to multiple language tracks, that is, chinese audio data, english audio data, and the like. The first audio may be one of the multiple audio data provided by the second electronic device. In particular implementation, in response to a user operation on a first electronic device, a second electronic device sends a corresponding first audio to the first electronic device.
In this embodiment of the application, a first electronic device receives a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration of communication between the second electronic device and the first electronic device. In this way, in this embodiment, the playing time stamp of the first audio is used as a reference, and the first delay time length reflecting the communication delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first delay time length, and thus the first audio output by the first electronic device and the target video displayed by the second electronic device can be played synchronously. And aiming at the sensitivity of human ears to continuous audio signals, the audio and video synchronization is carried out by taking the playing time stamp of the first audio as a reference, so that better audio and video experience can be provided for users.
In some embodiments of the application, after the playing the first audio, the method may further include: receiving a first request sent by third electronic equipment; sending confirmation information of the first request to the third electronic device, where the confirmation information includes a second time delay duration and a first time stamp, so that when the third electronic device receives a second audio sent by the second electronic device, the second audio is synchronously played based on the second time delay duration and the first time stamp; the second audio is synchronous with the target video, the sound tracks corresponding to the second audio and the first audio are different, the second delay time is the time delay time of communication between the third electronic device and the first electronic device, and the first timestamp reflects the playing progress of the first audio.
In this embodiment, the third electronic device may be an electronic device for outputting the second audio. The second audio is synchronized with the target video, and the sound tracks corresponding to the second audio and the first audio are different. Illustratively, the second electronic device may provide audio data corresponding to multiple tracks, for example, audio data corresponding to multiple language tracks, i.e., chinese audio data, english audio data, and the like. The first audio may be one of multiple audio data provided by the second electronic device, for example, chinese audio data. The second audio may be another audio data of the multiple audio data provided by the second electronic device, for example, english audio data. It should be noted that, when the third electronic device may send the second request to the second electronic device, the second electronic device sends the second audio to the third electronic device when receiving the second request.
The first request may be an audio synchronization request sent by the third electronic device to the first electronic device. The acknowledgement information of the first request may carry a first timestamp and a second delay duration. The first timestamp is a timestamp of the first electronic device playing the first audio, and the first timestamp may reflect a playing progress of the first audio. The second delay time may reflect a communication delay of the third electronic device with the first electronic device.
In specific implementation, an application program for audio and video synchronous playing is installed in the third electronic device, the application program is started, and an operation of adding to watch videos is executed through the application program, so that a second request is sent to the second electronic device, and a second audio returned by the second electronic device is received. Meanwhile, the operation of joining in watching the video is executed through the application program, and a first request can be sent to the first electronic device so as to receive the first timestamp and the second delay time length returned by the first electronic device. And then, based on the first timestamp and the second time delay length of the first audio, determining a playing time point of the second audio, and starting to play the second audio based on the playing time point, so that the target video displayed by the second electronic equipment, the first audio output by the first electronic equipment, and the second audio output by the third electronic equipment are synchronously played.
In this embodiment, a first time stamp of the first audio is used as a reference, and a first time delay duration that reflects a communication time delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first time delay duration, and implement synchronous playing of the first audio output by the first electronic device and the target video displayed by the second electronic device. Furthermore, the playing time stamp of the first audio is used as a reference, the second time delay duration reflecting the communication time delay of the third electronic device and the first electronic device is determined, the second audio is played according to the second time delay duration and the first time stamp of the first audio, and audio and video synchronous playing among multiple devices can be achieved.
It is to be understood that the communication connection, e.g. a bluetooth communication connection, of the third electronic device with the first electronic device is established before receiving the first request sent by the third electronic device. Illustratively, an application program for audio and video synchronous playing is installed in the first electronic device, the application program is started, a third electronic device is added as an electronic device for outputting a second audio, and a communication connection is established with the third electronic device.
In some embodiments of the present application, before receiving the first request sent by the third electronic device, the method may further include: step 2100-step 2300.
At step 2100, a first time period is determined, where the first time period reflects a path delay of the first electronic device.
In some embodiments of the present application, the determining the first duration may further include: determining the first duration by playing a first test signal; the first duration is a time interval between a third time and a fourth time, the third time is an initial time when the first electronic device plays the first test signal, and the fourth time is a time when an audio input module of the first electronic device acquires the first test signal played by an audio output module.
In this embodiment, the first duration reflects a self-path delay of the first electronic device. The first test signal can be a high-frequency pulse signal which is good in anti-interference performance, and the test accuracy can be improved. The audio output module of the first electronic device is a speaker. The audio input module of the first electronic device is a microphone.
After step 2100, step 2200 is performed to determine a second duration, where the second duration reflects a time delay duration for the first electronic device to acquire the audio played by the third electronic device.
In some embodiments of the present application, the determining the second duration includes: determining the second duration by sending a second test signal to the third electronic device; the second duration is a time interval between a fifth time and a sixth time, the fifth time is a time when the first electronic device sends the second test signal, and the sixth time is a time when the audio input module of the first electronic device acquires the second test signal played by the third electronic device.
In this embodiment, the second duration reflects a time delay duration of the entire path between the third electronic device and the first electronic device. The second test signal can be an audio signal, the high-frequency pulse signal has better anti-interference performance, and the test accuracy can be improved. The audio output module of the first electronic device is a speaker. The audio input module of the first electronic device is a microphone.
After step 2200, step 2300 is performed to determine the second delay time duration according to the first time duration and the second time duration.
In this embodiment, the second delay time period may be determined by the first electronic device. Specifically, first, a first time length (Δ t) reflecting a self-path delay of the first electronic device is determined1). Specifically, a first test signal is played through an audio output module of the first electronic device, and the played first test signal is collected through an audio input device of the first electronic device, so that the first time length (Δ t) is determined according to a starting time when the first test signal is played by the first electronic device and a time when the first test signal is played by the audio output device of the first electronic device and collected by the audio input device of the first electronic device1)。
Thereafter, a second time length ([ delta ] t) reflecting the time delay time length of the whole path between the third electronic device and the first electronic device is determined2). Specifically, the first electronic device establishes a communication connection, for example, a bluetooth communication connection, a wireless network communication connection, with the third electronic device. The first electronic device sends a second test signal to a third electronic device, the third electronic device receives and plays the second test signal, and the audio input device of the first electronic device collects the second test signal played by the third electronic device, so that a second duration (delta t) is determined according to the time when the first electronic device sends the second test signal and the time when the audio input device of the first electronic device collects the second test signal played by the third electronic device2)。
Thereafter, determining when communication reflecting the first electronic device with the third electronic device is determinedA second delay time length of delay, the second time length (delta t)2) With a first duration (Δ t)1) As a second delay time period (t)2=△t2-△t1)。
It should be noted that, when receiving the first request sent by the third electronic device, the first electronic device determines the second delay time period based on the communication connection established with the third electronic device. The second electronic device may also determine the second delay time period based on a communication connection established with the third electronic device before receiving the first request sent by the third electronic device.
In this embodiment, a first time length reflecting the self-path delay of the first electronic device is determined, and a path delay between the first electronic device and the third electronic device is determined, so as to determine a second delay time length according to the first time length and the second time length, which can improve the accuracy of detection. And the third electronic equipment is controlled to play the second audio based on the second time delay duration by taking the first time stamp of the first audio as a reference, so that the synchronous playing of the first audio and the second audio can be realized, the synchronous playing of the target video and the multi-channel audio is realized, and different requirements of various viewers are met when the videos are watched by multiple persons. In addition, the audio and video synchronization is carried out by taking the time stamp of the first audio as a reference, so that the rule of sensitivity of human ears to audio signals is met, and better audio and video experience can be provided.
The following describes the method for playing audio/video by using a specific example.
As shown in fig. 3, the second electronic device 301 (i.e., a TV terminal) is used to display a target video and provide audio data of a plurality of tracks corresponding to the target video. The first electronic device 302 (i.e., the master phone) is connected to the second electronic device for receiving and outputting the first audio. The third electronic device 303 (i.e., a slave phone) is respectively connected to the first electronic device 302 and the second electronic device 301, and is configured to receive the second audio sent by the second electronic device 302 and output the second audio according to a first timestamp of the first audio played by the first electronic device 302.
More specifically, when the second electronic device 301 plays the target video, a first delay duration is determined, where the first delay duration is a delay duration for the first electronic device 302 to communicate with the second electronic device 301. Based on the first delay duration, the first audio is sent to the first electronic device 302 at a first time, and the target video starts to be played at a second time, where the second time is later than the first time, and a time interval between the second time and the first time is the first delay duration.
After that, the third electronic device 303 sends a second request to the second electronic device 301, and receives a second audio returned by the second electronic device 301. Meanwhile, the third electronic device 303 further sends the first request to the first electronic device 302, and receives confirmation information of the first request returned by the first electronic device 302, where the confirmation information includes a first timestamp reflecting a playing progress of the first audio and a second delay duration reflecting a communication delay between the first electronic device 302 and the third electronic device 303. The third electronic device 303 determines a playing time point of the second audio according to the first timestamp and the second delay time, and plays the second audio according to the playing time point to implement synchronous playing of the second audio and the first audio, thereby implementing synchronous playing of the target video and the multiple channels of audio.
In this embodiment, a first time stamp of the first audio is used as a reference, and a first time delay duration reflecting a communication time delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first time delay duration, and the first audio output by the first electronic device and the target video displayed by the second electronic device can be synchronously played. Furthermore, the playing time stamp of the first audio is used as a reference, a second time delay duration reflecting the communication time delay between the third electronic device and the first electronic device is determined, the second audio is played according to the second time delay duration and the first time stamp of the first audio, and audio and video synchronous playing among multiple devices can be achieved. Therefore, when a plurality of users watch videos, different watching requirements of each user can be met, and the video watching experience is improved.
According to the audio and video playing method provided by the embodiment of the application, the execution main body can be an audio and video playing device. In the embodiment of the present application, a method for executing audio/video playing by an audio/video playing device is taken as an example, and an audio/video playing device provided in the embodiment of the present application is described.
Corresponding to the above embodiments, referring to fig. 4, an embodiment of the present application further provides an audio/video playing apparatus 400, where the audio/video playing apparatus 400 includes a first receiving module 401 and a playing module 402.
The first receiving module 401 is configured to receive a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration of communication between the second electronic device and the first electronic device;
the playing module 402 is configured to play the first audio, where the first audio and the target video are played synchronously.
Optionally, the apparatus further comprises: the second receiving module is used for receiving a first request sent by third electronic equipment; a sending module, configured to send confirmation information of the first request to the third electronic device, where the confirmation information includes a second time delay duration and a first time stamp, so that when the third electronic device receives a second audio sent by the second electronic device, the second audio is synchronously played based on the second time delay duration and the first time stamp; the second audio is synchronous with the target video, the sound tracks corresponding to the second audio and the first audio are different, the second delay time is the time delay time of communication between the third electronic device and the first electronic device, and the first timestamp reflects the playing progress of the first audio.
Optionally, the apparatus further comprises: a first determining module, configured to determine a first time length, where the first time length reflects a path delay of the first electronic device; the second determining module is used for determining a second time length, and the second time length reflects the time delay time length of the first electronic equipment for acquiring the audio played by the third electronic equipment; and the third determining module is used for determining the second time delay duration according to the first time duration and the second time duration.
Optionally, the first determining module is specifically configured to: determining the first duration by playing a first test signal; the first duration is a time interval between a third time and a fourth time, the third time is an initial time when the first electronic device plays the first test signal, and the fourth time is a time when an audio input module of the first electronic device acquires the first test signal played by an audio output module.
Optionally, the second determining module is specifically configured to: determining the second duration by sending a second test signal to the third electronic device; the second duration is a time interval between a fifth time and a sixth time, the fifth time is a time when the first electronic device sends the second test signal, and the sixth time is a time when the audio input module of the first electronic device acquires the second test signal played by the third electronic device.
In this embodiment of the application, a first electronic device receives a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration of communication between the second electronic device and the first electronic device. In this way, in this embodiment, the playing time stamp of the first audio is used as a reference, and the first delay time length reflecting the communication delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first delay time length, and thus the first audio output by the first electronic device and the target video displayed by the second electronic device can be played synchronously. And aiming at the sensitivity of human ears to continuous audio signals, the audio and video synchronization is carried out by taking the playing time stamp of the first audio as a reference, so that better audio and video experience can be provided for users.
The audio/video playing device in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be a device other than a terminal. The electronic Device may be, for example, a Mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic Device, a Mobile Internet Device (MID), an Augmented Reality (AR)/Virtual Reality (VR) Device, a robot, a wearable Device, an ultra-Mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and may also be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine, a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The audio/video playing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The audio/video playing device provided in the embodiment of the present application can implement each process implemented by the method embodiments in fig. 1 to fig. 3, and is not described herein again to avoid repetition.
Optionally, as shown in fig. 5, an electronic device 500 is further provided in an embodiment of the present application, and includes a processor 501 and a memory 502, where the memory 502 stores a program or an instruction that can be executed on the processor 501, and when the program or the instruction is executed by the processor 501, the steps of the above-described embodiment of the audio and video playing method can be implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 600 includes, but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and the like.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 610 is configured to receive a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration for communication between the second electronic device and the first electronic device; an audio output unit 603, configured to play the first audio, where the first audio and the target video are played synchronously.
Optionally, the processor 610, after playing the first audio, is further configured to: receiving a first request sent by third electronic equipment; sending confirmation information of the first request to the third electronic device, where the confirmation information includes a second time delay duration and a first time stamp, so that when the third electronic device receives a second audio sent by the second electronic device, the second audio is synchronously played based on the second time delay duration and the first time stamp; the second audio is synchronous with the target video, the sound tracks corresponding to the second audio and the first audio are different, the second delay time is the time delay time of communication between the third electronic device and the first electronic device, and the first timestamp reflects the playing progress of the first audio.
Optionally, before receiving the first request sent by the third electronic device, the processor 610 is further configured to: determining a first time length reflecting a path delay of the first electronic device; determining a second time length, wherein the second time length reflects the time delay time length of the first electronic equipment for acquiring the audio played by the third electronic equipment; and determining the second time delay time length according to the first time length and the second time length.
Optionally, the processor 610, in determining the first time length, is configured to: determining the first duration by playing a first test signal; the first duration is a time interval between a third time and a fourth time, the third time is an initial time when the first electronic device plays the first test signal, and the fourth time is a time when an audio input module of the first electronic device acquires the first test signal played by an audio output module.
Optionally, the processor 610, when determining the second time length, is configured to: determining the second duration by sending a second test signal to the third electronic device; the second duration is a time interval between a fifth time and a sixth time, the fifth time is a time when the first electronic device sends the second test signal, and the sixth time is a time when the audio input module of the first electronic device acquires the second test signal played by the third electronic device.
In this embodiment of the application, a first electronic device receives a first audio sent by a second electronic device at a first time, where the first audio is synchronized with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay duration, and the first delay duration is a delay duration of communication between the second electronic device and the first electronic device. In this way, in this embodiment, the play timestamp of the first audio is used as a reference, and the first delay time reflecting the communication delay between the second electronic device and the first electronic device is determined, so as to receive and play the first audio corresponding to the target video and sent by the second electronic device based on the first delay time, and thus the first audio output by the first electronic device and the target video displayed by the second electronic device can be played synchronously. And aiming at the sensitivity of human ears to continuous audio signals, the audio and video synchronization is carried out by taking the playing time stamp of the first audio as a reference, so that better audio and video experience can be provided for users.
It is to be understood that, in the embodiment of the present application, the input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics Processing Unit 6041 processes image data of a still picture or a video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. A touch panel 6071, also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 609 may include volatile memory or nonvolatile memory, or the memory 609 may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM). The memory 609 in the embodiments of the subject application include, but are not limited to, these and any other suitable types of memory.
Processor 610 may include one or more processing units; optionally, the processor 610 integrates an application processor, which mainly handles operations related to the operating system, user interface, application programs, etc., and a modem processor, which mainly handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned audio/video playing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read only memory ROM, a random access memory RAM, a magnetic or optical disk, and the like.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, so that the processes of the embodiment of the audio and video playing method are realized, the same technical effects can be achieved, and the repeated description is omitted here for avoiding repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
The embodiments of the present application provide a computer program product, where the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the processes of the above-mentioned embodiment of the audio/video playing method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An audio and video playing method is applied to first electronic equipment, and is characterized by comprising the following steps:
receiving a first audio sent by a second electronic device at a first time, wherein the first audio is synchronous with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first time delay duration, and the first time delay duration is a time delay duration of communication between the second electronic device and the first electronic device;
and playing the first audio, wherein the first audio and the target video are played synchronously.
2. The method of claim 1, wherein after the playing the first audio, the method further comprises:
receiving a first request sent by third electronic equipment;
sending confirmation information of the first request to the third electronic device, where the confirmation information includes a second time delay duration and a first time stamp, so that when the third electronic device receives a second audio sent by the second electronic device, the second audio is synchronously played based on the second time delay duration and the first time stamp;
the second audio is synchronous with the target video, the sound tracks corresponding to the second audio and the first audio are different, the second delay time is the time delay time of communication between the third electronic device and the first electronic device, and the first timestamp reflects the playing progress of the first audio.
3. The method of claim 2, wherein prior to receiving the first request sent by the third electronic device, the method comprises:
determining a first time length reflecting a path delay of the first electronic device;
determining a second time length, wherein the second time length reflects the time delay time length of the first electronic equipment for acquiring the audio played by the third electronic equipment;
and determining the second time delay time length according to the first time length and the second time length.
4. The method of claim 3, wherein determining the first duration comprises:
determining the first duration by playing a first test signal;
the first duration is a time interval between a third time and a fourth time, the third time is an initial time when the first electronic device plays the first test signal, and the fourth time is a time when an audio input module of the first electronic device acquires the first test signal played by an audio output module.
5. The method of claim 3, wherein determining the second duration comprises:
determining the second duration by sending a second test signal to the third electronic device;
the second duration is a time interval between a fifth time and a sixth time, the fifth time is a time when the first electronic device sends the second test signal, and the sixth time is a time when the audio input module of the first electronic device acquires the second test signal played by the third electronic device.
6. An audio and video playing device is applied to a first electronic device, and is characterized in that the device comprises:
the first receiving module is used for receiving a first audio sent by a second electronic device at a first time, wherein the first audio is synchronous with a target video played by the second electronic device at a second time, the second time is later than the first time, a time interval between the second time and the first time is a first delay time, and the first delay time is a time delay time for communication between the second electronic device and the first electronic device;
and the playing module is used for playing the first audio, wherein the first audio and the target video are played synchronously.
7. The apparatus of claim 6, further comprising:
the second receiving module is used for receiving a first request sent by third electronic equipment;
a sending module, configured to send confirmation information of the first request to the third electronic device, where the confirmation information includes a second time delay duration and a first time stamp, so that when the third electronic device receives a second audio sent by the second electronic device, the second audio is synchronously played based on the second time delay duration and the first time stamp;
the second audio is synchronous with the target video, the sound tracks corresponding to the second audio and the first audio are different, the second delay time is the time delay time of communication between the third electronic device and the first electronic device, and the first timestamp reflects the playing progress of the first audio.
8. The apparatus of claim 7, further comprising:
a first determining module, configured to determine a first time length, where the first time length reflects a path delay of the first electronic device;
the second determining module is used for determining a second time length, and the second time length reflects the time delay time length of the first electronic equipment for acquiring the audio played by the third electronic equipment;
and the third determining module is used for determining the second time delay duration according to the first time duration and the second time duration.
9. The apparatus of claim 8, wherein the first determining module is specifically configured to:
determining the first duration by playing a first test signal;
the first duration is a time interval between a third time and a fourth time, the third time is an initial time when the first electronic device plays the first test signal, and the fourth time is a time when an audio input module of the first electronic device acquires the first test signal played by an audio output module.
10. The apparatus of claim 8, wherein the second determining module is specifically configured to:
determining the second duration by sending a second test signal to the third electronic device;
the second duration is a time interval between a fifth time and a sixth time, the fifth time is a time when the first electronic device sends the second test signal, and the sixth time is a time when the audio input module of the first electronic device acquires the second test signal played by the third electronic device.
CN202210194810.XA 2022-02-28 2022-02-28 Audio and video playing method and device Pending CN114554270A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210194810.XA CN114554270A (en) 2022-02-28 2022-02-28 Audio and video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210194810.XA CN114554270A (en) 2022-02-28 2022-02-28 Audio and video playing method and device

Publications (1)

Publication Number Publication Date
CN114554270A true CN114554270A (en) 2022-05-27

Family

ID=81662527

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210194810.XA Pending CN114554270A (en) 2022-02-28 2022-02-28 Audio and video playing method and device

Country Status (1)

Country Link
CN (1) CN114554270A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101933333A (en) * 2007-10-08 2010-12-29 摩托罗拉公司 Remote audio and fixed video is synchronous
WO2011028174A1 (en) * 2009-09-01 2011-03-10 Tcl Thomson Electronics Singapore Pte Ltd Signal processing device for simultaneously outputting more than one language
CN104837046A (en) * 2015-01-08 2015-08-12 腾讯科技(北京)有限公司 Multi-media file processing method and device
CN105100891A (en) * 2014-04-21 2015-11-25 联想(北京)有限公司 Audio data obtaining method and device
CN105430436A (en) * 2015-10-30 2016-03-23 青岛海尔智能家电科技有限公司 Method and device of sharing television audios by mobile terminals
CN105679345A (en) * 2015-12-28 2016-06-15 联想(北京)有限公司 Audio processing method and electronic equipment
CN106686438A (en) * 2016-12-29 2017-05-17 北京奇艺世纪科技有限公司 Cross-device audio/image synchronous playing method, equipment and system
CN106792073A (en) * 2016-12-29 2017-05-31 北京奇艺世纪科技有限公司 Method, playback equipment and system that the audio, video data of striding equipment is synchronously played
CN107734378A (en) * 2017-10-31 2018-02-23 维沃移动通信有限公司 A kind of audio and video synchronization method, device and mobile terminal
CN109144642A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Display control method, device, electronic equipment and storage medium
CN109168059A (en) * 2018-10-17 2019-01-08 上海赛连信息科技有限公司 A kind of labial synchronization method playing audio & video respectively on different devices
CN111352605A (en) * 2018-12-20 2020-06-30 海信视像科技股份有限公司 Audio playing and sending method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101933333A (en) * 2007-10-08 2010-12-29 摩托罗拉公司 Remote audio and fixed video is synchronous
WO2011028174A1 (en) * 2009-09-01 2011-03-10 Tcl Thomson Electronics Singapore Pte Ltd Signal processing device for simultaneously outputting more than one language
CN105100891A (en) * 2014-04-21 2015-11-25 联想(北京)有限公司 Audio data obtaining method and device
CN104837046A (en) * 2015-01-08 2015-08-12 腾讯科技(北京)有限公司 Multi-media file processing method and device
CN105430436A (en) * 2015-10-30 2016-03-23 青岛海尔智能家电科技有限公司 Method and device of sharing television audios by mobile terminals
CN105679345A (en) * 2015-12-28 2016-06-15 联想(北京)有限公司 Audio processing method and electronic equipment
CN106686438A (en) * 2016-12-29 2017-05-17 北京奇艺世纪科技有限公司 Cross-device audio/image synchronous playing method, equipment and system
CN106792073A (en) * 2016-12-29 2017-05-31 北京奇艺世纪科技有限公司 Method, playback equipment and system that the audio, video data of striding equipment is synchronously played
CN107734378A (en) * 2017-10-31 2018-02-23 维沃移动通信有限公司 A kind of audio and video synchronization method, device and mobile terminal
CN109144642A (en) * 2018-08-14 2019-01-04 Oppo广东移动通信有限公司 Display control method, device, electronic equipment and storage medium
CN109168059A (en) * 2018-10-17 2019-01-08 上海赛连信息科技有限公司 A kind of labial synchronization method playing audio & video respectively on different devices
CN111352605A (en) * 2018-12-20 2020-06-30 海信视像科技股份有限公司 Audio playing and sending method and device

Similar Documents

Publication Publication Date Title
CN108235086B (en) Video playing control method and device and corresponding terminal
CN109660817B (en) Video live broadcast method, device and system
CN108616772B (en) Bullet screen display method, terminal and server
CN111988654B (en) Video data alignment method and device and electronic equipment
CN104080006A (en) Video processing device and method
CN112969093A (en) Interactive service processing method, device, equipment and storage medium
CN113992972A (en) Subtitle display method and device, electronic equipment and readable storage medium
CN112711368A (en) Operation guidance method and device and electronic equipment
CN109753262B (en) Frame display processing method and device, terminal equipment and storage medium
CN109547830B (en) Method and device for synchronous playing of multiple virtual reality devices
CN109361939B (en) Video playing method and terminal equipment
CN110913256A (en) Video searching method and electronic equipment
CN114554270A (en) Audio and video playing method and device
CN112995699B (en) Online live broadcast method, live broadcast equipment, live broadcast system and electronic equipment
CN112637409B (en) Content output method and device and electronic equipment
CN113938759A (en) File sharing method and file sharing device
CN115103054B (en) Information processing method, device, electronic equipment and medium
CN113766362A (en) Remote control method, device, electronic equipment and storage medium
CN115665458A (en) Video playing method and device, electronic equipment and storage medium
WO2023029924A1 (en) Comment information display method and apparatus, device, storage medium, and program product
CN115102917A (en) Message sending method, message processing method and device
CN117651180A (en) Video playing method and device and electronic equipment
CN117956210A (en) Audio and video synchronization adjustment method and related equipment
CN113840100A (en) Video processing method and device and electronic equipment
CN117608459A (en) Screenshot method, screenshot device, screenshot equipment and screenshot medium

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