WO2017177524A1 - 音视频同步播放的方法及装置 - Google Patents

音视频同步播放的方法及装置 Download PDF

Info

Publication number
WO2017177524A1
WO2017177524A1 PCT/CN2016/084944 CN2016084944W WO2017177524A1 WO 2017177524 A1 WO2017177524 A1 WO 2017177524A1 CN 2016084944 W CN2016084944 W CN 2016084944W WO 2017177524 A1 WO2017177524 A1 WO 2017177524A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
time
external sound
initial
sound device
Prior art date
Application number
PCT/CN2016/084944
Other languages
English (en)
French (fr)
Inventor
柯杰燕
戚炎兴
孟梁军
Original Assignee
深圳Tcl新技术有限公司
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 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2017177524A1 publication Critical patent/WO2017177524A1/zh

Links

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
    • 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
    • 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/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • 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/439Processing of audio elementary streams
    • 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/439Processing of audio elementary streams
    • H04N21/4394Processing of audio elementary streams involving operations for analysing the audio stream, e.g. detecting features or characteristics in audio streams

Definitions

  • the present invention relates to the field of computer multimedia technologies, and in particular, to a method and apparatus for synchronous playback of audio and video.
  • the playing device can allow the user to adjust according to the delay of the external sound playing device, so that the playing sound is synchronized with the video.
  • the user often adjusts the confirmation manually according to the video and the sound step by step, and the adjustment method is cumbersome and affects the user experience.
  • the main object of the present invention is to provide a method and device for synchronous playback of audio and video, which aims to automatically adjust the synchronization of audio and video images when playing audio of a multimedia file through an external sound device.
  • a method for synchronous playback of audio and video includes the following steps:
  • the second audio time segment is marked and compared with the first audio to obtain an initial time period for receiving the external audio device to play the first audio, according to the initial time period. And determining, by the first initial time and the first time parameter, a delay time when the external sound device plays audio:
  • the initial value of i is 1, and i is less than or equal to N;
  • the present invention provides another method for determining audio and video synchronous playback, including:
  • the present invention further provides an apparatus for determining audio and video synchronous playback, and the apparatus for synchronously playing audio and video includes:
  • a first acquiring module configured to acquire device information of the external sound device when the audio of the multimedia file is played by the external sound device
  • a determining module configured to search a preset database according to the device information, and determine a delay time when the external sound device plays audio, where the preset database includes the device information and the delay time Correspondence relationship;
  • an adjustment module configured to adjust a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • the device information of the external sound device is acquired; and the preset database is searched according to the device information, and the delay of playing the audio by the external sound device is determined.
  • the preset database includes a correspondence between the device information and the delay time; adjusting a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • FIG. 1 is a schematic flow chart of a first embodiment of a method for synchronous playback of audio and video according to the present invention
  • FIG. 2 is a schematic flow chart of a second embodiment of a method for synchronous playback of audio and video according to the present invention
  • step S60 is a schematic flowchart of the refinement of step S60 in the embodiment shown in FIG. 2 according to the present invention
  • step S630 is a schematic flowchart of the refinement of step S630 in the embodiment shown in FIG. 3 according to the present invention.
  • FIG. 5 is a schematic diagram of a refinement process of determining whether to send a reminder message to a user according to the second time difference value in step S633 in the embodiment shown in FIG. 4;
  • FIG. 6 is a schematic structural diagram of functional modules of a first embodiment of an apparatus for synchronous playback of audio and video according to the present invention
  • FIG. 7 is a schematic structural diagram of functional modules of a second embodiment of an apparatus for synchronous playback of audio and video according to the present invention.
  • FIG. 8 is a schematic diagram of a refinement function module of the analysis determining module 60 in the embodiment shown in FIG. 7 of the present invention.
  • the invention provides a method for synchronous playback of audio and video.
  • the method for synchronously playing the audio and video includes:
  • Step S10 When playing audio of the multimedia file by using the external sound device, acquiring device information of the external sound device;
  • Step S20 searching for a preset database according to the device information, determining a delay time when the external sound device plays audio, and the preset database includes a correspondence between the device information and the delay time.
  • Step S30 adjusting a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • the method for synchronously playing audio and video is used to synchronize the audio played by the external sound device with the video played by the terminal when the external audio device is used to play the audio of the multimedia file when the terminal is connected to the external sound device.
  • External sound devices are usually used to play sound when connected or paired with the terminal. Common external sound devices include Bluetooth speakers, Bluetooth headsets, etc.
  • the terminals have notebooks, desktop computers, mobile phones, and the like.
  • the multimedia file is a file containing audio and video.
  • the terminal When the terminal is connected to an external sound device and plays a multimedia file on the terminal, the screen is played on the terminal (such as a mobile phone or a computer), and the audio passes.
  • An external sound device plays.
  • the audio of the multimedia file is played by the external sound device, the device information of the external sound device is obtained, and the device information is information for identifying the external sound device, and the premise of obtaining the external sound device is to establish a connection relationship with the external sound device. .
  • the preset database is searched according to the device information, and the delay time when the external audio device plays the audio is determined.
  • the preset database stores the correspondence between the device information and the delay time. Therefore, according to the device information of the external sound device and searching in the preset database, the corresponding delay time when the external sound device plays the sound can be obtained.
  • the preset data inventory is located in the terminal that connects the external sound device to play audio, and may also exist in other places, and the specific address may be selected as needed.
  • the synchronization of the audio and video images can be automatically adjusted according to the delay time of the external sound device, and the method of synchronizing the audio and video images can be adjusted, and the video screen can be temporarily tentatively waiting for replay.
  • the length of the pause wait is equal to the length of the playback delay time.
  • the bluetooth speaker plays the audio of the multimedia file when playing a multimedia file on the mobile phone.
  • the device information of the bluetooth speaker Before playing the multimedia file, first obtain the device information of the bluetooth speaker, and then according to the obtained device information, find the delay time when the bluetooth speaker plays the audio according to the preset database, when the delay time is 5 seconds.
  • the video controlling the multimedia file is delayed for 5 seconds, and the video played by the terminal just after 5 seconds is just synchronized with the audio played by the Bluetooth speaker.
  • the device information of the external sound device is acquired; and the preset database is searched according to the device information, and the delay time when the external sound device plays the audio is determined.
  • the preset database includes a correspondence between the device information and the delay time; adjusting a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • the foregoing step S10 includes:
  • Step S40 sending the preset first audio to the external sound device, and recording the first initial time for transmitting the first audio
  • Step S50 after transmitting the first audio, acquiring a second audio played by the external sound device and a first time parameter for receiving the second audio;
  • Step S60 marking the second audio time segment and performing comparison analysis with the first audio, to obtain an initial time period for receiving the external audio device to play the first audio, according to the initial time period, Determining, by the first initial time and the first time parameter, a delay time when the external sound device plays audio;
  • Step S70 saving the delay time and device information of the external sound device in the database.
  • the method for determining the delay time of the external sound device is analyzed. After the delay time of the external sound device is acquired, the delay time and the device information of the external sound device are saved in a preset database for When the audio of the multimedia file is played by using the external sound device, the delay time of the external sound device can be automatically obtained, and the audio and video of the multimedia file are synchronously played according to the delay time.
  • the preset first audio is a preset sound, which is used to distinguish common sounds of the user, avoids interference when analyzing and calculating the delay time of the external sound device, and sends the first audio to the external sound device.
  • the purpose is to analyze the delay time of acquiring the external sound device, and a sound with a specific sound length of a specific frequency can be selected as the first audio as needed.
  • the method of transmitting the preset first audio to the external sound device may be sent by means that the external sound device can receive directly, for example, by a device having a Bluetooth module. While transmitting the preset first audio to the external sound device, the record saves the first initial time at which the first audio is transmitted.
  • the second audio played by the external sound device is obtained.
  • the second audio may be played after the first audio is correctly received, and the first audio may not be correctly received.
  • the second audio played by the external sound device is acquired, and the first time parameter of the second audio is received, where the first time parameter is related to receiving the second audio.
  • the time parameter is specifically the time at which each audio data of the second audio is received while receiving the second audio. Therefore, the time at which each audio data of the second audio is received can be obtained according to the first time parameter.
  • the second audio time segment is then marked and compared with the first audio to obtain an initial time period for receiving the external audio device to play the first audio.
  • the first audio will be played after receiving the first audio
  • the second audio will contain the audio data of the first audio, so the initiality of playing the first audio by receiving the external sound device is determined.
  • the time period may determine when the external audio device is acquired to play the first audio after transmitting the first audio to the external sound device.
  • the first time parameter is a time parameter related to receiving the second audio, including the time of receiving each audio data of the second audio, when the initial time period of receiving the first audio is determined, the first time may be The parameter obtains an initial time point of receiving the initial time of the first audio, and then determines a delay time when the external sound device plays the audio according to the first initial time of transmitting the first audio.
  • the delay information of the external sound device is stored in the preset database corresponding to the device information, so that the delay information when the external sound device plays the sound can be Get it directly when needed.
  • the present invention by transmitting a preset first audio external sound device, recording the first initial time of the transmission, acquiring the second audio of the external sound device, and receiving the first time parameter of the second audio, and then according to the first Comparing the audio with the second audio to obtain an initial time period for receiving the first audio by the external sound device, and determining a delay time when the external sound device plays the sound according to the initial time period, the first initial time, and the first time parameter, and The delay time and the device information of the external sound device are saved, and the delay time for automatically acquiring and saving the external sound device is realized, and after the delay time and the device information are saved, the device can be saved according to the saved device next time. The information and delay time are automatically adjusted.
  • the audio and video pictures are synchronized when the external sound device is played.
  • the foregoing step S60 includes:
  • Step S610 segmenting the second audio according to a preset time interval, and dividing into N segments, where N is a positive integer;
  • Step S620 obtaining the i-th segment analysis audio after the second audio segment mark, the initial value of i is 1, and i is less than or equal to N;
  • Step S630 comparing and analyzing the ith segment analysis audio with the first audio, to obtain an initial time period for receiving the external audio device to play the first audio, according to the initial time period, the first The initial time and the first time parameter determine a delay time when the external sound device plays audio.
  • the first segment after the second audio segment mark is acquired as the first segment analysis audio, for example, 0-0.1 seconds of the second segment audio is acquired as the first segment analysis audio.
  • the purpose is to segment the second audio first and then compare it with the first audio.
  • the first audio is segmented and analyzed according to a preset time interval, and an initial time period for receiving the first audio by the external sound device is obtained, and then according to the initial time period, the first initial time, and the first time.
  • the parameter determines the delay time of the external sound device, so that the delay time of the external sound device can be automatically obtained without user judgment.
  • the first time parameter includes receiving the second audio. a second initial time, a third initial time for receiving the ith segment of the second audio, and an end time for receiving the second audio;
  • the refining step of the above step S630 includes:
  • Step S631 it is determined whether the similarity between the i-th segment analysis audio and the first audio is less than a preset value; if yes, step S632 is performed; otherwise, step S633 is performed;
  • Step S632 obtaining an initial time period in which the i th segment is the first audio, and determining that the first time difference between the third initial time of the i th segment analysis audio and the first initial time is the delay time. time;
  • Step S633 calculating a second time difference value between the end time and the second initial time, and determining, according to the second time difference value, whether to send a reminder message to the user.
  • the second initial time is a time when the second audio played by the external sound device is received
  • the third initial time is an initial time when the external audio device receives the ith segment of the analyzed audio
  • the end time is an external sound.
  • the device plays the end time of the analysis of the audio in the i-th segment, and since the first parameter is the time of continuous recording when the audio data of the second audio is received, the third initial time and the end time are also recorded.
  • the purpose of determining whether the similarity between the audio of the i-th segment and the first audio is less than a preset value is to compare the sound received by the external sound device with the sound of the transmitted sound, and determine that the external sound device is received.
  • the initial time period of an audio is to compare the sound received by the external sound device with the sound of the transmitted sound, and determine that the external sound device is received.
  • the i-th segment analysis audio is used to compare with the first audio.
  • the i-th segment analysis audio is compared with the first audio, as long as the audio similarity is within a certain range, it can be determined that the two are the same.
  • a sound where the preset value can be set as needed.
  • the i-th analysis audio and the first audio can be analyzed according to a selection method.
  • the similarity between the audio of the i-th segment and the first audio is less than the preset value, it indicates that the first audio is played in the analysis audio of the i-th segment, and the i-th segment is the initial time period for receiving the first audio by the external audio device. .
  • the first time difference when the second audio is received is subtracted from the initial time when the second audio is received, and the first time difference is obtained, and the first time difference is the delay time when the external sound device plays the sound.
  • the similarity between the audio of the i-th segment and the first piece of audio is not less than the preset value, it indicates that the two may not be the same segment of sound.
  • the second time difference between the end time of the second audio and the second initial time of receiving the second audio is the time length of the second audio. According to the length of time of the second audio, it is analyzed whether the receiving process is incorrect. If there is an error, the reminder message is directly fed back to the user to remind the user to perform the next operation.
  • the embodiment of the present invention compares the similarity between the i-th segment analysis audio and the first audio with a preset value, and analyzes an initial time period during which the external audio device receives the first audio, and calculates an initial time period for playing the first audio. Calculating a time difference between the initial time and the first initial time of transmitting the first audio, that is, when the similarity between the i-th segment analysis audio and the first audio is less than a preset value, calculating a third initial time of the i-th segment analysis audio and the first initial The time difference of time is taken as the delay time, thereby automatically obtaining the delay time when the external sound device plays the sound.
  • the step S633 is determined according to the second time difference.
  • the steps to refine the feedback message to the user include:
  • Step S301 determining whether the second time difference value is greater than a preset limit time; if yes, executing step S302, otherwise performing step S303;
  • Step S302 feeding back to the user, the reminder message that the delay time fails to be confirmed
  • the second time difference is the length of the second audio played by the external sound device.
  • the preset limit time is set as needed, and the purpose is to determine whether the length of the acquired second audio exceeds a certain limit.
  • the time of the second audio exceeds the preset limit time, indicating that the received second audio may be incorrect, and the external sound device may not be normal. Work, so send a message to the user that the confirmation delay time failed, or send a message to prompt the user to confirm whether the external sound device is working properly.
  • the user can perform the next operation according to the received message, for example, adjusting the external sound device and then sending the sound again. .
  • the second time period of the first audio is acquired at this time, 0.1 second to 0.2 second.
  • the audio in one segment compares the audio from 0.1 to 0.2 with the first audio.
  • the third segment of the analysis audio may continue to be acquired for comparison until two similar audios are found.
  • a message prompt may be sent to the user to confirm whether the sound segment is incorrect.
  • the start time of sending the first audio is 12:00
  • the time when the audio is received is 12:01
  • the second audio obtained is 3 seconds, divided into 30 segments, each segment is 0.1 seconds
  • the first segment The time period for analyzing audio is 12:01 to 12:02
  • the second analysis audio is 12:02 to 12:03
  • the fifth period of analysis audio is from 12:05 to 12:06.
  • the five-segment analysis audio is less than the preset value compared with the first audio, it indicates that the fifth segment is the starting time period for playing the first audio, and the delay time is 0.5 seconds, that is, 12:05 minus 12:00. Time difference.
  • the similarity between the audio and the first audio in the i-th segment is greater than a preset value
  • the present invention also provides an apparatus for synchronous playback of audio and video.
  • FIG. 6 a first embodiment of an apparatus for synchronous playback of audio and video according to the present invention is provided.
  • the apparatus for synchronous playback of audio and video includes:
  • the first obtaining module 10 is configured to acquire device information of the external sound device when the audio of the multimedia file is played by the external sound device;
  • the determining determining module 20 is configured to search a preset database according to the device information, and determine a delay time when the external sound device plays audio, where the preset database includes the device information and the delay time Correspondence between
  • the adjusting module 30 is configured to adjust a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • the device for synchronously playing audio and video is configured to synchronize the audio played by the external sound device with the video played by the terminal when the terminal uses the external sound device to play the audio of the multimedia file when the terminal is connected to the external sound device.
  • External sound devices are usually used to play sound when connected or paired with the terminal. Common external sound devices include Bluetooth speakers, Bluetooth headsets, etc.
  • the terminals have notebooks, desktop computers, mobile phones, and the like.
  • the device information of the external sound device is acquired; and the preset database is searched according to the device information, and the delay time when the external sound device plays the audio is determined.
  • the preset database includes a correspondence between the device information and the delay time; adjusting a video of the multimedia file according to the delay time, so that the audio is played synchronously with the video.
  • the apparatus for synchronous playback of audio and video further includes:
  • the audio sending module 40 is configured to send the preset first audio to the external sound device, and record a first initial time for sending the first audio;
  • the second obtaining module 50 is configured to acquire, after the sending the first audio, a second audio played by the external sound device and a first time parameter for receiving the second audio;
  • An analysis determining module 60 configured to mark the second audio time segment and compare the analysis with the first audio, to obtain an initial time period for receiving the external audio device to play the first audio, according to the initial The time period, the first initial time, and the first time parameter determine a delay time when the external sound device plays audio;
  • the saving module 70 is configured to save the delay time and device information of the external sound device in the database.
  • the present invention by transmitting a preset first audio external sound device, recording the first initial time of the transmission, acquiring the second audio of the external sound device, and receiving the first time parameter of the second audio, and then according to the first Comparing the audio with the second audio to obtain an initial time period for receiving the first audio by the external sound device, and determining a delay time when the external sound device plays the sound according to the initial time period, the first initial time, and the first time parameter, and The delay time and the device information of the external sound device are saved, and the delay time for automatically acquiring and saving the external sound device is realized, and after the delay time and the device information are saved, the device can be saved according to the saved device next time. The information and delay time are automatically adjusted.
  • the audio and video pictures are synchronized when the external sound device is played.
  • the analysis determining module 60 includes:
  • the audio processing sub-module 610 is configured to segment the second audio according to a preset time interval, and divide it into N segments, where N is a positive integer;
  • the obtaining sub-module 620 is configured to obtain the ith segment analysis audio after the second audio segment flag, where the initial value of i is 1, and i is less than or equal to N;
  • a determining sub-module 630 configured to compare the ith segment analysis audio with the first audio, to obtain an initial time period for receiving the external audio device to play the first audio, according to the initial time period, The first initial time and the first time parameter determine a delay time when the external sound device plays audio.
  • the first audio is segmented and analyzed according to a preset time interval, and an initial time period for receiving the first audio by the external sound device is obtained, and then according to the initial time period, the first initial time, and the first time.
  • the parameter determines the delay time of the external sound device, so that the delay time of the external sound device can be automatically obtained without user judgment.
  • the first time parameter includes a second initial time for receiving the second audio.
  • the determining submodule 630 includes:
  • a determining unit configured to determine whether the similarity between the ith segment analysis audio and the first audio is less than a preset value
  • a determining unit configured to: when the i-th segment analysis audio and the first audio are less than a preset value, obtain an initial time period in which the i-th segment is playing the first audio, and determine the i-th segment A first time difference between the third initial time of the analysis audio and the first initial time is the delay time;
  • a calculating unit configured to calculate a second time difference between the end time and the second initial time when the similarity between the ith segment analysis audio and the first audio is not less than a preset value, according to the The second time difference determines whether the reminder message is fed back to the user.
  • the embodiment of the present invention compares the similarity between the i-th segment analysis audio and the first audio with a preset value, and analyzes an initial time period during which the external audio device receives the first audio, and calculates an initial time period for playing the first audio. Calculating a time difference between the initial time and the first initial time of transmitting the first audio, that is, when the similarity between the i-th segment analysis audio and the first audio is less than a preset value, calculating a third initial time of the i-th segment analysis audio and the first initial The time difference of time is taken as the delay time, thereby automatically obtaining the delay time when the external sound device plays the sound.
  • the calculating unit includes:
  • a determining subunit configured to determine whether the second time difference value is greater than a preset limit time
  • a message feedback subunit configured to: when the second time difference value is greater than a preset limit time, feed back to the user a reminder message that the delay time fails to be confirmed;
  • the audio is analyzed in the ith segment after the audio segmentation.
  • the similarity between the audio and the first audio in the i-th segment is greater than a preset value

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

一种音视频同步播放的方法及音视频同步播放的装置,所述方法包括:当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。实现了通过外接声音设备播放多媒体文件的音频时,自动调整音频与视频画面同步的目的。

Description

音视频同步播放的方法及装置
技术领域
本发明涉及计算机多媒体技术领域,尤其涉及音视频同步播放的方法及装置。
背景技术
随着计算机多媒体技术的发展,生活中人们常常在电脑、手机等设备上播放声音或视频等多媒体文件,在播放的同时,也常常采用外接声音设备播放声音,如蓝牙音箱、蓝牙耳机等。但是,当用户连接外接声音设备时,常常会发现声音与视频不同步,例如当视频中人物说完一句话之后,外接声音设备才播放出视频中人物的声音,外接声音设备带来的声音延迟使用户体验较差。
现有技术中播放设备可以让用户根据外接声音播放设备的延时进行调整,使得播放声音与视频同步。在这种情况下,用户往往自己根据视频与声音一步一步手动调整确认,调整方式比较繁琐,影响用户体验。
发明内容
本发明的主要目的在于提供一种音视频同步播放的方法及装置,旨在实现通过外接声音设备播放多媒体文件的音频时,自动调整音频与视频画面同步的目的。
为实现上述目的,本发明提供的一种音视频同步播放的方法包括以下步骤:
发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
将所述延时时间和所述外接声音设备的设备信息保存在预置的数据库中,所述预置的数据库存在于所述外接声音设备中;
当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
根据所述设备信息查找所述数据库,确定所述外接声音设备播放音频时的延时时间,所述数据库包含所述设备信息与所述延时时间之间的对应关系;
根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
优选地,所述将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间包括:
将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
为实现上述目的,本发明提供另一种确定音视频同步播放的方法,包括:
当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
此外,为实现上述目的,本发明还提供一种确定音视频同步播放的装置,所述音视频同步播放的装置包括:
第一获取模块,用于当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
查找确定模块,用于根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
调整模块,用于根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
本发明实施例通过当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。通过连接外接声音设备播放多媒体文件的音频时先获取该外接声音设备的设备信息再根据设备信息查询延时时间,再根据延时时间调整多媒体文件的音频与视频同步播放,使得在使用外接声音设备播放多媒体文件的音频时,无需用户每次手动调整,实现了自动调整音频与视频画面同步的目的。
附图说明
图1为本发明音视频同步播放的方法第一实施例的流程示意图;
图2为本发明音视频同步播放的方法第二实施例的流程示意图;
图3为本发明图2所示实施例中步骤S60的细化流程示意图;
图4为本发明图3所示实施例中步骤S630的细化流程示意图;
图5为本发明图4所示实施例中步骤S633中根据所述第二时间差值判断是否向用户反馈提醒消息的细化流程示意图;
图6为本发明音视频同步播放的装置第一实施例的功能模块结构示意图;
图7为本发明音视频同步播放的装置第二实施例的功能模块结构示意图;
图8为本发明图7所示实施例中分析确定模块60的细化功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种音视频同步播放的方法。参照图1,在第一实施例中,该音视频同步播放的方法包括:
步骤S10,当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
步骤S20,根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
步骤S30,根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
本发明提供的音视频同步播放的方法用于当终端与外接声音设备相连接的情况下,使用外接声音设备播放多媒体文件的音频时,使得外接声音设备播放的音频与终端播放的视频同步。外接声音设备通常用于与终端连接或配对时播放声音,常见的外接声音设备有蓝牙音箱、蓝牙耳机等,终端有笔记本、台式电脑、手机等。
本实施例中,上述多媒体文件是包含音频与视频的文件,当终端与外接声音设备连接并在终端上播放多媒体文件时,画面会在终端上播放(如手机、电脑等终端),音频会通过外接声音设备播放。当通过外接声音设备播放多媒体文件的音频时,获取外接声音设备的设备信息,所述设备信息是用于标识外接声音设备的信息,获取外接声音设备的前提是要与该外接声音设备建立连接关系。
当获取到设备信息后,根据设备信息查找预置的数据库,确定该外接声音设备播放音频时的延时时间。上述预置的数据库中保存设备信息与延时时间的对应关系,因此根据外接声音设备的设备信息到预置的数据库中进行查找,能够获得对应的该外接声音设备播放声音时的延时时间。上述预置的数据库存在于连接外接声音设备播放音频的终端中,也可以存在于其他地方,具体地址可以根据需要进行选择。
当获取到外接声音设备的延时时间后,可以根据外接声音设备的延时时间自动调整音频与视频画面的同步,调整音频与视频画面同步的方法,可以控制视频画面先暂定等待再播放,暂停等待的时间长度与播放延时时间的时间长度相等。
例如当手机与蓝牙音箱连接,在手机上播放一段多媒体文件时,该蓝牙音箱会播放该多媒体文件的音频。在播放多媒体文件之前,先获取该蓝牙音箱的设备信息,再根据获取到的设备信息到预置的数据库中查找该蓝牙音箱播放音频时的延时时间,当查找到延时时间为5秒时,控制多媒体文件的视频延迟5秒播放,则5秒之后终端播放的视频刚好和该蓝牙音箱播放的音频同步。
本实施例通过当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。通过连接外接声音设备播放多媒体文件的音频时先获取该外接声音设备的设备信息再根据设备信息查询延时时间,再根据延时时间调整多媒体文件的音频与视频同步播放,使得在使用外接声音设备播放多媒体文件的音频时,无需用户每次手动调整,实现了自动调整音频与视频画面同步的目的。
进一步地,参照图2,基于本发明音视频同步播放的方法第一实施例,在本发明获取外接声音设备延时时间的方法第二实施例中,上述步骤S10之前包括:
步骤S40,发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
步骤S50,在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
步骤S60,将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
步骤S70,将所述延时时间和所述外接声音设备的设备信息保存在所述数据库中。
本实施例是分析确定外接声音设备的延时时间的方法,当获取到外接声音设备的延时时间后,将延时时间与该外接声音设备的设备信息保存在预置的数据库中,以供当使用该外接声音设备播放多媒体文件的音频时,可以自动获取该外接声音设备的延时时间并根据延时时间调整多媒体文件的音频与视频同步播放。
本实施例中,上述预置的第一音频是预置的一段声音,用于区别用户常见的声音,避免分析计算外接声音设备的延时时间时出现干扰,发送第一音频至外接声音设备的目的是分析获取该外接声音设备的延时时间,可以根据需要选定一种特定频率特定声音长度的声音作为第一音频。发送预置的第一音频至外接声音设备的方法可以通过外接声音设备能够直接接收的方式发送,例如通过具有蓝牙模块的设备发送至蓝牙音箱。当发送预置的第一音频至外接声音设备的同时,记录保存发送第一音频的第一初始时间。
当发送第一音频后,获取外接声音设备播放的第二音频,当外接声音设备正常工作时可能正确接收到了第一音频以后开始播放第二音频,也可能没有正确接收到第一音频。此时,无论外接声音设备是否正确接收到第一音频,都获取外接声音设备播放的第二音频,以及接收第二音频的第一时间参数,上述第一时间参数是与接收第二音频有关的时间参数,具体是在接收第二音频的同时记录接收到第二音频的每一个音频数据的时间。因此,根据第一时间参数可以得到接收第二音频的每一个音频数据的时间。
然后将第二音频分时间段标记并与第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段。当外接声音设备正常工作时,在接收到第一音频后会播放第一音频,此时第二音频中会包含第一音频的音频数据,因此通过确定接收到外接声音设备播放第一音频的初始时间段,可以确定在发送第一音频给外接声音设备后,何时获取到外接声音设备播放第一音频。由于第一时间参数是与接收第二音频有关的时间参数,包含接收到第二音频的每一个音频数据的时间,因此当确定了接收到第一音频的初始时间段后,可以根据第一时间参数得到接收到第一音频的初始时间的初始时间点,然后再根据发送第一音频的第一初始时间来确定该外接声音设备播放音频时的延时时间。
当确定了外接声音设备播放音频时的延时时间后,将该外接声音设备的延时信息与设备信息对应保存在预置的数据库中,使得该外接声音设备播放声音时的延时信息能够在需要时直接获取。
本发明实施例通过发送预置的第一音频外接声音设备,记录发送的第一初始时间,再获取该外接声音设备的第二音频,以及接收第二音频的第一时间参数,然后根据第一音频与第二音频对比分析得到接收到外接声音设备播放第一音频的初始时间段,再根据初始时间段、第一初始时间和第一时间参数确定外接声音设备播放声音时的延时时间,并将延时时间与该外接声音设备的设备信息保存,实现了自动获取并保存外接声音设备的延时时间,并且在延时时间与设备信息被保存后,下次再连接时可以根据保存的设备信息和延时时间自动调整连接该外接声音设备播放时音频与视频画面同步。
进一步地,参照图3,基于本发明音视频同步播放的方法第二实施例,在本发明获取外接声音设备延时时间的方法第三实施例中,上述步骤S60包括:
步骤S610,将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
步骤S620,获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
步骤S630,将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
本实施例中上述将第二音频按照预置的时间间隔分段是指将第二音频分别分成N段,其中预置的时间间隔和N的值可以根据需要进行选择设置。例如在获取到第二音频为3秒时,将第二音频分为30段,即N=30,每0.1秒每段。
当第二音频做了分段标记处理后,获取第二音频分段标记后的第一段作为第一段分析音频,例如获取第二段音频的0-0.1秒作为第一段分析音频。目的是将第二音频先分段标记后再与第一音频做比对。
通过将第二音频标记后的第i段分析音频与第一音频对比分析,得到接收到外接声音设备播放第一音频的初始时间段,再根据初始时间段、第一初始时间和第一时间参数确定外接声音设备播放音频时的延时时间。
本发明实施例通过将第一音频按照预置的时间间隔分段标记并分析,得到接收到外接声音设备播放第一音频的初始时间段,然后根据初始时间段、第一初始时间和第一时间参数确定外接声音设备的延时时间,使得无需用户判断,就能够自动获取外接声音设备的延时时间。
进一步地,参照图4,基于本发明音视频同步播放的方法第三实施例,在本发明获取外接声音设备延时时间第四实施例中,第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间;
则上述步骤S630的细化步骤包括:
步骤S631,判断所述第i段分析音频与所述第一音频的相似度是否小于预设值;若是,执行步骤S632;否则,执行步骤S633;
步骤S632,得到第i段为播放所述第一音频的初始时间段,确定所述第i段分析音频的第三初始时间与所述第一初始时间的第一时间差值为所述延时时间;
步骤S633,计算所述结束时间与第二初始时间的第二时间差值,根据所述第二时间差值判断是否向用户反馈提醒消息。
本实施例中上述第二初始时间是接收到外接声音设备播放的第二音频时的时间,上述第三初始时间是接收外接声音设备播放第i段分析音频的初始时间,上述结束时间是外接声音设备播放第i段分析音频的结束时间,由于第一参数是在接收到第二音频的音频数据时持续记录的时间,因此上述第三初始时间和结束时间也被记录了。上述判断所述第i段分析音频与所述第一音频的相似度是否小于预设值的目的是将外接声音设备接收到的声音与发送时的声音进行对比,判断接收到外接声音设备播放第一音频的初始时间段。由于一段声音数据是由连续的音频数据组成,两段音频在某一个时刻的声音数据相似不意味着两段音频是同一段音频,因此音频相似性的判断需要通过多个连续的音频数据进行对比,这里采取第i段分析音频来与第一音频进行对比。通常外接声音设备接收到声音再播放出来时,声音也会有损耗,因此将第i段分析音频与第一音频进行对比分析时,只要音频的相似度在一定范围内就可以判定两者是同一段声音,其中,预设值可以根据需要进行设定。将两段声音进行对比分析相似度的方法有很多,属于现有技术,这里不再赘述。可以根据需要选择方法将第i段分析音频与第一音频进行分析。
当第i段分析音频与第一音频的相似度小于预设值时,表明在第i段分析音频中播放了第一音频,第i段为接收到外接声音设备播放第一音频的初始时间段。此时,获取从发送第一音频到接收到第i段分析音频经过了多长时间,就可以得到外接声音设备播放声音时的延时时间。因此,将接收到第i段分析音频的初始时间减去发送第二音频时的第一初始时间,得到第一时间差,第一时间差即为外接声音设备播放声音时的延时时间。
当第i段分析音频与第一段音频的相似度不小于预设值时,表明两者可能不是同一段声音,此时,判断获取到的第二音频是否是有效的声音,计算此时接收到第二音频的结束时间与接收第二音频的第二初始时间之间的第二时间差,则第二时间差即为第二音频的时间长度。根据第二音频的时间长度分析接收过程是否有误,如果有误,直接向用户反馈提醒消息,用于提醒用户进行下一步操作。
本发明实施例通过将第i段分析音频与第一音频的相似度与预设值对比,分析得到接收到外接声音设备播放第一音频的初始时间段,计算播放第一音频的初始时间段的初始时间与发送第一音频的第一初始时间的时间差,即当第i段分析音频与第一音频的相似度小于预设值时,计算第i段分析音频的第三初始时间与第一初始时间的时间差作为所述延时时间,从而自动获取了外接声音设备播放声音时的延时时间。
进一步地,参照图5,基于本发明音视频同步播放的方法第四实施例,在本发明获取外接声音设备延时时间第五实施例中,上述步骤S633中根据所述第二时间差值判断是否向用户反馈提醒消息的细化步骤包括:
步骤S301,判断所述第二时间差值是否大于预置的限制时间;若是,执行步骤S302,否则执行步骤S303;
步骤S302,向用户反馈确认所述延时时间失败的提醒消息;
步骤S303,令i=i+1,且当i小于或等于N时,返回执行所述获取所述第二音频分段标记后的第i段分析音频的步骤。
本实施例中上述第二时间差值就是外接声音设备播放的第二音频的长度。上述预置的限制时间根据需要进行设定,目的是判断获取到的第二音频的长度是否超过了一定的限制。
若第一段分析音频与第一音频的相似度超过了预设值,第二音频的时间又超过了预置的限制时间,表明接收到的第二音频可能有误,外接声音设备可能没有正常工作,因此向用户发送确认延时时间失败的消息,也可以发送消息提示用户确认外接声音设备是否正常工作,用户可以根据接收到的消息进行下一步的操作,例如调整外接声音设备后再次发送声音。
若第一段分析音频与第一音频的声音相似度超过了预设值,但是第二音频的时间没有超过预置的限制时间,表明接收到的第二音频不一定有错误,此时令i=i+1,执行获取第二音频分段标记后的第i段分析音频,判断所述第i段分析音频与所述第一音频的相似度是否小于预设值的步骤。
例如,当之前已经获取了第二音频的第一个时间段0至0.1秒的声音与第一音频进行对比分析后,此时获取第一音频的第二个时间段,0.1秒至0.2秒这一段内的音频,将0.1至0.2这一段时间内的音频与第一音频进行对比分析。
当第二段分析音频与第一音频的相似度超过预设值时,可以继续获取第三段分析音频进行对比,直到找到两段相似的音频。当第二音频中第N段声音与第一音频相比均不相同时,可以向用户发送消息提示,由用户确认是否声音片段有误。
例如,当发送第一音频的起始时间是12:00,接收到音频的时间时12:01,获取到的第二音频为3秒,分为30段,每段0.1秒,则第一段分析音频的时间段为12:01至12:02,第二段分析音频为12:02至12:03,如此类推,第五段分析音频的时间段为12:05至12:06,当第五段分析音频与第一音频比较小于预设值时,表明第五段为播放第一音频的起始时间段,此时延时时间为0.5秒,即,12:05减去12:00的时间差。
本实施例通过当第i段分析音频与第一音频的相似度大于预设值时,进一步判断第二时间差值是否大于预置的限制时间,当第二时间差值大于预置的限制时间时,向用户反馈提醒消息,当不大于时,继续获取第i+1段分析音频与第i+1段对比音频并判断其相似性,从而自动获取外接声音设备的延时时间,当获取了延时时间后将延时时间保存,使得再次使用时可以根据延时时间调整音视频画面同步。
本发明还提供一种音视频同步播放的装置,参照图6,提供了本发明音视频同步播放的装置第一实施例,该实施例中,音视频同步播放的装置包括:
第一获取模块10,用于当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
查找确定模块20,用于根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
调整模块30,用于根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
本发明提供的音视频同步播放的装置用于当终端与外接声音设备相连接的情况下,使用外接声音设备播放多媒体文件的音频时,使得外接声音设备播放的音频与终端播放的视频同步。外接声音设备通常用于与终端连接或配对时播放声音,常见的外接声音设备有蓝牙音箱、蓝牙耳机等,终端有笔记本、台式电脑、手机等。
本实施例通过当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。通过连接外接声音设备播放多媒体文件的音频时先获取该外接声音设备的设备信息再根据设备信息查询延时时间,再根据延时时间调整多媒体文件的音频与视频同步播放,使得在使用外接声音设备播放多媒体文件的音频时,无需用户每次手动调整,实现了自动调整音频与视频画面同步的目的。
进一步地,参照图7,基于本发明音视频同步播放的装置第一实施例,在本发明音视频同步播放的装置第二实施例中,上述音视频同步播放的装置还包括:
音频发送模块40,用于发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
第二获取模块50,用于在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
分析确定模块60,用于将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
保存模块70,用于将所述延时时间和所述外接声音设备的设备信息保存在所述数据库中。
本发明实施例通过发送预置的第一音频外接声音设备,记录发送的第一初始时间,再获取该外接声音设备的第二音频,以及接收第二音频的第一时间参数,然后根据第一音频与第二音频对比分析得到接收到外接声音设备播放第一音频的初始时间段,再根据初始时间段、第一初始时间和第一时间参数确定外接声音设备播放声音时的延时时间,并将延时时间与该外接声音设备的设备信息保存,实现了自动获取并保存外接声音设备的延时时间,并且在延时时间与设备信息被保存后,下次再连接时可以根据保存的设备信息和延时时间自动调整连接该外接声音设备播放时音频与视频画面同步。
进一步地,参照图8,基于本发明音视频同步播放的装置第二实施例,在本发明音视频同步播放的装置第三实施例中,上述分析确定模块60包括:
音频处理子模块610,用于将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
获取子模块620,用于获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
确定子模块630,用于将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
本发明实施例通过将第一音频按照预置的时间间隔分段标记并分析,得到接收到外接声音设备播放第一音频的初始时间段,然后根据初始时间段、第一初始时间和第一时间参数确定外接声音设备的延时时间,使得无需用户判断,就能够自动获取外接声音设备的延时时间。
进一步地,基于本发明音视频同步播放的装置第三实施例,在本发明音视频同步播放的装置第四实施例中,上述第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间;
上述确定子模块630包括:
判断单元,用于判断所述第i段分析音频与所述第一音频的相似度是否小于预设值;
确定单元,用于当所述第i段分析音频与所述第一音频的相似度小于预设值时,得到第i段为播放所述第一音频的初始时间段,确定所述第i段分析音频的第三初始时间与所述第一初始时间的第一时间差值为所述延时时间;
计算单元,用于当所述第i段分析音频与所述第一音频的相似度不小于预设值时,计算所述结束时间与第二初始时间的第二时间差值,根据所述第二时间差值判断是否向用户反馈提醒消息。
本发明实施例通过将第i段分析音频与第一音频的相似度与预设值对比,分析得到接收到外接声音设备播放第一音频的初始时间段,计算播放第一音频的初始时间段的初始时间与发送第一音频的第一初始时间的时间差,即当第i段分析音频与第一音频的相似度小于预设值时,计算第i段分析音频的第三初始时间与第一初始时间的时间差作为所述延时时间,从而自动获取了外接声音设备播放声音时的延时时间。
进一步地,基于本发明音视频同步播放的装置第四实施例,在本发明音视频同步播放的装置第五实施例中,上述计算单元包括:
判断子单元,用于判断所述第二时间差值是否大于预置的限制时间;
消息反馈子单元,用于当所述第二时间差值大于预置的限制时间时,向用户反馈确认所述延时时间失败的提醒消息;
触发子单元,用于当所述第二时间差值不大于预置的限制时间时,令i=i+1,且当i小于或等于N时,触发所述获取子模块获取所述第二音频分段标记后的第i段分析音频。
本实施例通过当第i段分析音频与第一音频的相似度大于预设值时,进一步判断第二时间差值是否大于预置的限制时间,当第二时间差值大于预置的限制时间时,向用户反馈提醒消息,当不大于时,继续获取第i+1段分析音频与第i+1段对比音频并判断其相似性,从而自动获取外接声音设备的延时时间,当获取了延时时间后将延时时间保存,使得再次使用时可以根据延时时间调整音视频画面同步。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (15)

  1. 一种音视频同步播放的方法,其特征在于,所述方法包括以下步骤:
    发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
    在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
    将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
    将所述延时时间和所述外接声音设备的设备信息保存在预置的数据库中,所述预置的数据库存在于所述外接声音设备中;
    当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
    根据所述设备信息查找所述数据库,确定所述外接声音设备播放音频时的延时时间,所述数据库包含所述设备信息与所述延时时间之间的对应关系;
    根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
  2. 权利要求1所述的方法,其特征在于,所述将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间包括:
    将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
    获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
    将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
  3. 如权利要求2所述的方法,其特征在于,所述第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间。
  4. 权利要求3所述的方法,其特征在于,所述第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间;
    则所述将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间包括:
    判断所述第i段分析音频与所述第一音频的相似度是否小于预设值;
    若是,则得到第i段为播放所述第一音频的初始时间段,确定所述第i段分析音频的第三初始时间与所述第一初始时间的第一时间差值为所述延时时间;
    若否,则计算所述结束时间与第二初始时间的第二时间差值,根据所述第二时间差值判断是否向用户反馈提醒消息。
  5. 权利要求4所述的方法,其特征在于,所述根据所述第二时间差值判断是否向用户反馈提醒消息包括:
    判断所述第二时间差值是否大于预置的限制时间;
    若是,则向用户反馈确认所述延时时间失败的提醒消息;
    若否,则令i=i+1,且当i小于或等于N时,返回执行所述获取所述第二音频分段标记后的第i段分析音频的步骤。
  6. 种音视频同步播放的方法,其特征在于,所述方法包括以下步骤:
    当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
    根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
    根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
  7. 权利要求6所述的方法,其特征在于,所述当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息之前包括:
    发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
    在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
    将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
    将所述延时时间和所述外接声音设备的设备信息保存在所述数据库中。
  8. 权利要求7所述的方法,其特征在于,所述将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间包括:
    将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
    获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
    将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
  9. 权利要求8所述的方法,其特征在于,所述第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间;
    则所述将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间包括:
    判断所述第i段分析音频与所述第一音频的相似度是否小于预设值;
    若是,则得到第i段为播放所述第一音频的初始时间段,确定所述第i段分析音频的第三初始时间与所述第一初始时间的第一时间差值为所述延时时间;
    若否,则计算所述结束时间与第二初始时间的第二时间差值,根据所述第二时间差值判断是否向用户反馈提醒消息。
  10. 权利要求9所述的方法,其特征在于,所述根据所述第二时间差值判断是否向用户反馈提醒消息包括:
    判断所述第二时间差值是否大于预置的限制时间;
    若是,则向用户反馈确认所述延时时间失败的提醒消息;
    若否,则令i=i+1,且当i小于或等于N时,返回执行所述获取所述第二音频分段标记后的第i段分析音频的步骤。
  11. 种音视频同步播放的装置,其特征在于,所述音视频同步播放的装置包括:
    第一获取模块,用于当通过外接声音设备播放多媒体文件的音频时,获取所述外接声音设备的设备信息;
    查找确定模块,用于根据所述设备信息查找预置的数据库,确定所述外接声音设备播放音频时的延时时间,所述预置的数据库包含所述设备信息与所述延时时间之间的对应关系;
    调整模块,用于根据所述延时时间调整所述多媒体文件的视频,使得所述音频与所述视频同步播放。
  12. 权利要求11所述的装置,其特征在于,所述音视频同步播放的装置还包括:
    音频发送模块,用于发送预置的第一音频至外接声音设备,记录发送所述第一音频的第一初始时间;
    第二获取模块,用于在发送所述第一音频后,获取所述外接声音设备播放的第二音频及接收所述第二音频的第一时间参数;
    分析确定模块,用于将所述第二音频分时间段标记并与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间;
    保存模块,用于将所述延时时间和所述外接声音设备的设备信息保存在所述数据库中。
  13. 权利要求12所述的装置,其特征在于,所述分析确定模块包括:
    音频处理子模块,用于将所述第二音频按照预置的时间间隔分段标记,分为N段,N为正整数;
    获取子模块,用于获取所述第二音频分段标记后的第i段分析音频,i的初始值为1,i小于或等于N;
    确定子模块,用于将所述第i段分析音频与所述第一音频对比分析,得到接收到所述外接声音设备播放所述第一音频的初始时间段,根据所述初始时间段、所述第一初始时间和所述第一时间参数确定所述外接声音设备播放音频时的延时时间。
  14. 权利要求13所述的装置,其特征在于,所述第一时间参数中包括接收所述第二音频的第二初始时间、接收所述第二音频中所述第i段分析音频的第三初始时间和接收所述第二音频的结束时间;
    则所述确定子模块包括:
    判断单元,用于判断所述第i段分析音频与所述第一音频的相似度是否小于预设值;
    确定单元,用于当所述第i段分析音频与所述第一音频的相似度小于预设值时,得到第i段为播放所述第一音频的初始时间段,确定所述第i段分析音频的第三初始时间与所述第一初始时间的第一时间差值为所述延时时间;
    计算单元,用于当所述第i段分析音频与所述第一音频的相似度不小于预设值时,计算所述结束时间与第二初始时间的第二时间差值,根据所述第二时间差值判断是否向用户反馈提醒消息。
  15. 权利要求14所述的装置,其特征在于,所述计算单元包括:
    判断子单元,用于判断所述第二时间差值是否大于预置的限制时间;
    消息反馈子单元,用于当所述第二时间差值大于预置的限制时间时,向用户反馈确认所述延时时间失败的提醒消息;
    触发子单元,用于当所述第二时间差值不大于预置的限制时间时,令i=i+1,且当i小于或等于N时,触发所述获取子模块获取所述第二音频分段标记后的第i段分析音频。
PCT/CN2016/084944 2016-04-11 2016-06-06 音视频同步播放的方法及装置 WO2017177524A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610221519.1 2016-04-11
CN201610221519.1A CN105898502B (zh) 2016-04-11 2016-04-11 音视频同步播放的方法及装置

Publications (1)

Publication Number Publication Date
WO2017177524A1 true WO2017177524A1 (zh) 2017-10-19

Family

ID=57012333

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/084944 WO2017177524A1 (zh) 2016-04-11 2016-06-06 音视频同步播放的方法及装置

Country Status (2)

Country Link
CN (1) CN105898502B (zh)
WO (1) WO2017177524A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073879A (zh) * 2020-09-11 2020-12-11 成都极米科技股份有限公司 音频同步播放方法、装置、视频播放设备及可读存储介质
CN113825022A (zh) * 2021-09-03 2021-12-21 成都欧珀通信科技有限公司 一种播放控制状态检测方法、装置、存储介质及电子设备
CN114070955A (zh) * 2021-11-29 2022-02-18 杭州逗酷软件科技有限公司 一种同步判断方法及装置、存储介质
CN114286145A (zh) * 2021-03-11 2022-04-05 海信视像科技股份有限公司 一种显示设备
CN116033228A (zh) * 2022-12-20 2023-04-28 深圳市东明炬创电子股份有限公司 一种多路音视频整合方法、装置、设备和介质
CN117768993A (zh) * 2023-12-25 2024-03-26 广东保伦电子股份有限公司 一种音频同步方法、音频播放***和存储介质
WO2024088010A1 (zh) * 2022-10-28 2024-05-02 惠州市德赛西威汽车电子股份有限公司 一种实现车辆提示信号同步的方法、***及车辆

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106782598A (zh) * 2016-12-15 2017-05-31 深圳Tcl数字技术有限公司 电视画面和外设声音同步控制方法和装置
CN108616767B (zh) * 2018-04-28 2020-12-29 海信视像科技股份有限公司 一种音频数据传输方法及装置
US11416209B2 (en) * 2018-10-15 2022-08-16 Sonos, Inc. Distributed synchronization
CN109451339B (zh) * 2018-12-28 2021-10-01 深圳Tcl新技术有限公司 音频传输方法、装置、设备及可读存储介质
CN112449278B (zh) * 2019-09-03 2022-04-22 深圳Tcl数字技术有限公司 一种自动校准延时输出声音的方法、装置、设备及存储介质
CN110971783B (zh) 2019-11-29 2022-08-02 深圳创维-Rgb电子有限公司 电视音画同步自整定方法、装置和存储介质
CN113555132A (zh) * 2020-04-24 2021-10-26 华为技术有限公司 多源数据处理方法、电子设备和计算机可读存储介质
CN112004133A (zh) * 2020-09-04 2020-11-27 成都极米科技股份有限公司 音画同调方法、装置、投影设备及可读存储介质
CN113409817B (zh) * 2021-06-24 2022-05-13 浙江松会科技有限公司 一种基于声纹技术的音频信号实时追踪比对方法
CN113645544A (zh) * 2021-07-02 2021-11-12 武汉市聚芯微电子有限责任公司 一种播放控制方法、装置和电子设备
CN114040237A (zh) * 2021-09-30 2022-02-11 茂佳科技(广东)有限公司 音频视频同步播放方法、终端、多媒体播放***及介质
CN116368809A (zh) * 2021-10-27 2023-06-30 京东方科技集团股份有限公司 音视频同步方法及装置、存储介质、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120206650A1 (en) * 2011-02-16 2012-08-16 Amtran Technology Co., Ltd Method for synchronized playback of wireless audio and video and playback system using the same
CN103905877A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN103905880A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN104796578A (zh) * 2015-04-29 2015-07-22 成都陌云科技有限公司 一种基于节目声音特征的多屏同步方法
CN105451056A (zh) * 2015-11-20 2016-03-30 小米科技有限责任公司 音视频同步方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8743284B2 (en) * 2007-10-08 2014-06-03 Motorola Mobility Llc Synchronizing remote audio with fixed video

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120206650A1 (en) * 2011-02-16 2012-08-16 Amtran Technology Co., Ltd Method for synchronized playback of wireless audio and video and playback system using the same
CN103905877A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN103905880A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN104796578A (zh) * 2015-04-29 2015-07-22 成都陌云科技有限公司 一种基于节目声音特征的多屏同步方法
CN105451056A (zh) * 2015-11-20 2016-03-30 小米科技有限责任公司 音视频同步方法及装置

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112073879A (zh) * 2020-09-11 2020-12-11 成都极米科技股份有限公司 音频同步播放方法、装置、视频播放设备及可读存储介质
CN114286145A (zh) * 2021-03-11 2022-04-05 海信视像科技股份有限公司 一种显示设备
CN114286145B (zh) * 2021-03-11 2023-02-24 海信视像科技股份有限公司 一种显示设备
CN113825022A (zh) * 2021-09-03 2021-12-21 成都欧珀通信科技有限公司 一种播放控制状态检测方法、装置、存储介质及电子设备
CN113825022B (zh) * 2021-09-03 2023-08-18 成都欧珀通信科技有限公司 一种播放控制状态检测方法、装置、存储介质及电子设备
CN114070955A (zh) * 2021-11-29 2022-02-18 杭州逗酷软件科技有限公司 一种同步判断方法及装置、存储介质
CN114070955B (zh) * 2021-11-29 2023-06-20 杭州逗酷软件科技有限公司 一种同步判断方法及装置、存储介质
WO2024088010A1 (zh) * 2022-10-28 2024-05-02 惠州市德赛西威汽车电子股份有限公司 一种实现车辆提示信号同步的方法、***及车辆
CN116033228A (zh) * 2022-12-20 2023-04-28 深圳市东明炬创电子股份有限公司 一种多路音视频整合方法、装置、设备和介质
CN117768993A (zh) * 2023-12-25 2024-03-26 广东保伦电子股份有限公司 一种音频同步方法、音频播放***和存储介质

Also Published As

Publication number Publication date
CN105898502A (zh) 2016-08-24
CN105898502B (zh) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2017177524A1 (zh) 音视频同步播放的方法及装置
WO2017005066A1 (zh) 录制音视频同步时间戳的方法和装置
WO2019000792A1 (zh) 音质调整方法、***、主机端、及存储介质
WO2018023926A1 (zh) 电视与移动终端的互动方法及***
WO2016091011A1 (zh) 字幕切换方法及装置
WO2016032021A1 (ko) 음성 명령 인식을 위한 장치 및 방법
WO2019119771A1 (zh) 语音交互方法、装置及计算机可读存储介质
WO2019128174A1 (zh) 音频播放方法、智能电视及计算机可读存储介质
WO2018045682A1 (zh) 音画同步测试方法及装置
WO2019051902A1 (zh) 终端控制方法、空调器及计算机可读存储介质
WO2014187158A1 (zh) 终端数据云分享的控制方法、服务器及终端
WO2017054488A1 (zh) 电视播放控制方法、服务器及电视播放控制***
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2018028124A1 (zh) 电视机及其信号源的切换方法
WO2016101252A1 (zh) 智能电视的频道信息显示方法及装置
WO2016090991A1 (zh) 流媒体数据的下载方法及装置
WO2017045441A1 (zh) 基于智能电视的音频播放方法及装置
WO2015058570A1 (zh) 自动识别网络运营商以实现数据配置的方法及装置
WO2016095280A1 (zh) 卡拉ok评分方法和装置
WO2017121066A1 (zh) 应用程序显示方法和***
WO2017005062A1 (zh) 图片帧播放方法和装置
WO2017113600A1 (zh) 视频播放方法及装置
WO2015169177A1 (en) Web page display method and apparatus
WO2017096764A1 (zh) 音频数据输出方法及装置
WO2022030857A1 (ko) 오디오 신호 처리 장치 및 그 동작 방법

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16898339

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16898339

Country of ref document: EP

Kind code of ref document: A1