CN107155126A - A kind of audio and video playing method and device - Google Patents

A kind of audio and video playing method and device Download PDF

Info

Publication number
CN107155126A
CN107155126A CN201710204716.7A CN201710204716A CN107155126A CN 107155126 A CN107155126 A CN 107155126A CN 201710204716 A CN201710204716 A CN 201710204716A CN 107155126 A CN107155126 A CN 107155126A
Authority
CN
China
Prior art keywords
data
current sync
audio
video
module
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
CN201710204716.7A
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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201710204716.7A priority Critical patent/CN107155126A/en
Publication of CN107155126A publication Critical patent/CN107155126A/en
Pending legal-status Critical Current

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiments of the invention provide a kind of audio and video playing method and device, audio, video data is received in receiving terminal, wherein, the audio, video data includes voice data and video data;One of the voice data and video data are set as current sync reference data, the audio, video data according to the current reference data playback;Judge whether the current sync reference data interrupts;If so, another reference synchronization data different from current sync reference data then are switched into current sync reference data;According to the current sync reference data after switching, the audio, video data is played.Can be the broadcasting that current sync reference data carries out audio frequency and video by another reference synchronization data setting when current sync reference data is interrupted using the embodiment of the present invention;User can now watch silent video, or can hear that sound can't see video, all suspend broadcasting relative to Voice & Video in the prior art, improve Consumer's Experience.

Description

A kind of audio and video playing method and device
Technical field
The present invention relates to video display arts field, more particularly to a kind of audio and video playing method and device.
Background technology
In audio and video playing field, audio, video data is influenceed in transmitting procedure by various factors, can cause sound Video can not be played synchronously in receiving terminal, cause the nonsynchronous reason of audio frequency and video mainly to have two kinds:One kind is terminal processes data Caused, transmitting terminal is in the modules such as the collection of data, coding, packing and receiving terminal in modules such as processing unpacking, decompression, playback When, the time difference caused by the data volume and encryption algorithm of Voice & Video are different.Another is network transmission delay, Network transmission is influenceed by factors such as the processing speeds of real-time Transmission bandwidth, transmission range and network node of network, During network congestion, audio, video data with continuous " stream " data mode it cannot be guaranteed that transmitted, particularly it cannot be guaranteed that data volume is big Video information continuously transmit, so as to cause the asynchronous of audio frequency and video.
For the synchronously playing audio frequency data in playing video data, people have been invented with video data or voice data Timestamp be reference synchronization data synchronous method.The core of the synchronous method is, is each frame video data in transmitting terminal Timestamp is stamped with voice data, receiving terminal is by the way that the audio, video data with identical time stamp is showed simultaneously.Generally In the case of, there are two kinds of synchronous method:The first synchronous method, using voice data as reference synchronization data, if video data transmitting Raw to interrupt, picture pause is played, and voice data continues to play, and subsequent video data continues by voice data as same after reaching Step reference data synchronizes broadcasting;If voice data is interrupted, voice data and video data all play pause, until follow-up After voice data is reached, resynchronisation is played.Second of synchronous method, using video data as reference synchronization data, if audio number According to interrupting, picture continues to play, and voice data pause is played, and subsequent audio data continues to make with video data after reaching Played for reference synchronization data syn-chronization;If video data is interrupted, voice data and video data all play pause, until follow-up After video data is reached, resynchronisation is played.
In synchronous playing process, audio or the corresponding timestamp of video are used as reference synchronization data, video or sound The broadcasting of frequency is determined by the corresponding broadcast state of reference synchronization data, so as to realize synchronization.Because the mankind are quicker to sound Sense, therefore, in actual applications, typically using the timestamp of voice data as reference synchronization data, video data is as from stream Reach the purpose of synchronous broadcasting.
Using prior art, due to, using fixed reference synchronization data, being used as reference synchronization number in playing process According to data interrupt when, the broadcasting of video/audio can all suspend, and reduce Consumer's Experience.
The content of the invention
The purpose of the embodiment of the present invention is to provide a kind of audio and video playing method and device, to improve Consumer's Experience.Tool Body technique scheme is as follows:
To achieve the above object, it is described applied to receiving terminal the embodiments of the invention provide a kind of audio and video playing method Method includes:
Audio, video data is received, wherein, the audio, video data includes voice data and video data;
One of the voice data and video data are set as current sync reference data, according to the current ginseng Examine audio, video data described in data playback;
Judge whether the current sync reference data interrupts;
When the current sync reference data is interrupted, by another synchronization different from current sync reference data Reference data switches to current sync reference data;
According to the current sync reference data after switching, the audio, video data is played.
Optionally, it is described to judge whether the current sync reference data interrupts, including:
Judge whether in the time interval of adjacent two frame data of the current sync reference data, receive current frame number According to next frame data.
Optionally, it is described when the current sync reference data is interrupted, will be different from current sync reference data Another reference synchronization data switch to current sync reference data, including:
Judge that whether the current sync reference data interrupts duration more than the first duration;
Another reference synchronization data different from current sync reference data are switched to currently together if so, execution is described The step of walking reference data.
Optionally, methods described also includes:
If the interruption ends in first duration, the of current sync reference data when obtaining the interruption ends One timestamp;
Obtain the second timestamp corresponding with very first time stamp in another reference synchronization data;
When from the very first time, stamp commences play out the current sync reference data, broadcast since second timestamp Put another reference synchronization data.
Optionally, methods described also includes:
The video data is set to main reference synchronization data in advance;
When the current sync reference data is not interrupted, determine whether whether another reference synchronization data are sent out It is raw to interrupt, in the case where the voice data and the video data are not interrupted, join when according to the current sync Whether when the duration for examining audio, video data described in data playback reaches the second duration, it is the master to judge current sync reference data Reference synchronization data;
If it is not, the video data is switched into current sync reference data, and according to the current sync reference data Play the audio, video data.
Optionally, methods described also includes:
The voice data is set to main reference synchronization data in advance;
When the current sync reference data is not interrupted, determine whether whether another reference synchronization data are sent out It is raw to interrupt, in the case where the voice data and the video data are not interrupted, join when according to the current sync Whether when the duration for examining audio, video data described in data playback reaches the second duration, it is the master to judge current sync reference data Reference synchronization data;
If it is not, the voice data is switched into current sync reference data, and according to the current sync reference data Play the audio, video data.
Optionally, the current sync reference data after according to switching, is played after the audio, video data, in addition to:
Record the switching times of current reference data;
Judge from the current sync reference data interrupt after the 4th duration in, it is default whether switching times reach Threshold value;
If so, synchronously playing the audio, video data according to external clock;
If it is not, return is described to judge the step of whether the current sync reference data interrupts.
To reach above-mentioned purpose, the embodiment of the present invention additionally provides a kind of audio and video display device, applied to receiving terminal, institute Stating device includes:Receiving module, the first setting module, the first judge module, the first handover module and the first playing module, its In,
The receiving module, for receiving audio, video data, wherein, the audio, video data includes voice data and video Data;
First setting module, for one of the voice data and video data to be set as into current sync is joined Data are examined, the audio, video data according to the current reference data playback;
First judge module, for judging whether the current sync reference data interrupts;
First handover module, for that when the current sync reference data is interrupted, will join with current sync Examine the different another reference synchronization data of data and switch to current sync reference data;
First playing module, for according to the current sync reference data after switching, playing the audio, video data.
Optionally, the judge module, specifically for:
Judge whether in the time interval of adjacent two frame data of the current sync reference data, receive current frame number According to next frame data.
Optionally, first handover module, specifically for:
Judge that whether the current sync reference data interrupts duration more than the first duration;
In the judge module judged result in the case of being, execution is described will be different from current sync reference data The step of another reference synchronization data switch to current sync reference data.
Optionally, described device also includes the first acquisition module, the second acquisition module and the second playing module, wherein,
Described first obtains module, if for the interruption ends in first duration, it is described during acquisition the interruption ends The very first time stamp of current sync reference data;
Described second obtains module, corresponding with very first time stamp in another reference synchronization data for obtaining Second timestamp;
Second playing module, when commencing play out the current sync reference data for being stabbed from the very first time, Another reference synchronization data are commenced play out from second timestamp.
Optionally, described device also includes:Second setting module, the second judge module and the second handover module, wherein,
Second setting module, for the video data to be set into main reference synchronization data in advance;
Second judge module, it is another for when the current sync reference data is not interrupted, determining whether Whether a kind of reference synchronization data interrupt, situation about not interrupted in the voice data and the video data Under, when the duration that the audio, video data is played according to the current sync reference data reaches the second duration, judge current Whether reference synchronization data are the main reference synchronization data;
Second handover module, in the case of being no in the second judge module judged result, is regarded described Frequency triggers the first playing module according to switching current sync reference data.
Optionally, described device also includes:3rd setting module, the 3rd judge module and the 3rd handover module, wherein,
3rd setting module, for the voice data to be set into main reference synchronization data in advance;
3rd judge module, it is another for when the current sync reference data is not interrupted, determining whether Whether a kind of reference synchronization data interrupt, situation about not interrupted in the voice data and the video data Under, when the duration that the audio, video data is played according to the current sync reference data reaches the second duration, judge current Whether reference synchronization data are the main reference synchronization data;
3rd handover module, in the case of being no in the 3rd judge module judged result, by the sound Frequency triggers the first playing module according to switching current sync reference data.
Optionally, described device also includes:Logging modle, the 4th judge module, the 3rd playing module, wherein,
The logging modle, the switching times for recording current reference data;
4th judge module, for judge from the current sync reference data interrupt after the 4th duration Interior, whether switching times reach predetermined threshold value, in the 4th judge module judged result in the case of being, to trigger described the Three playing modules, wherein, the 3rd playing module is used to synchronously play the audio, video data according to external clock;Described In the case that 4th judge module judged result is no, first judge module is triggered.
A kind of audio and video playing method and device provided in an embodiment of the present invention, audio, video data is received in receiving terminal, its In, the audio, video data includes voice data and video data;By the setting of one of the voice data and video data For current sync reference data, the audio, video data according to the current reference data playback;Judge the current sync ginseng Examine whether data interrupt;If so, then another reference synchronization data different from current sync reference data are switched to currently Reference synchronization data;According to the current sync reference data after switching, the audio, video data is played.
, can be when being interrupted as current sync reference data, by another synchronous ginseng using the embodiment of the present invention Examine the broadcasting that data switch to current sync reference data to carry out audio frequency and video;User can now watch silent video, or It can hear that sound can't see video, all suspend broadcasting relative to Voice & Video in the prior art, improve Consumer's Experience.
Certainly, implementing any product or method of the present invention must be not necessarily required to while reaching all the above excellent Point.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the first schematic flow sheet of audio and video playing method provided in an embodiment of the present invention;
Fig. 2 is second of schematic flow sheet of audio and video playing method provided in an embodiment of the present invention;
Fig. 3 is the third schematic flow sheet of audio and video playing method provided in an embodiment of the present invention;
Fig. 4 is the 4th kind of schematic flow sheet of audio and video playing method provided in an embodiment of the present invention;
Fig. 5 is the first structural representation of audio and video display device provided in an embodiment of the present invention;
Fig. 6 is second of structural representation of audio and video display device provided in an embodiment of the present invention;
Fig. 7 is the third structural representation of audio and video display device provided in an embodiment of the present invention;
Fig. 8 is the 4th kind of structural representation of audio and video display device provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
To solve prior art problem, the embodiments of the invention provide a kind of audio and video playing method and device, lower kept man of a noblewoman First a kind of audio and video playing method is introduced.
It should be noted that the embodiment of the present invention is preferably applied to receiving terminal.
Fig. 1 is the first schematic flow sheet of audio and video playing method provided in an embodiment of the present invention, and methods described includes:
S101:Audio, video data is received, wherein, the audio, video data includes voice data and video data.
In actual applications, receiving terminal receives audio, video data by network, wherein, audio, video data comprises at least audio Data and video data, voice data and video data are all transmitted in units of frame, and each frame all has the time Stamp, the timestamp of any frame in voice data is identical with the timestamp of correspondence frame in video data or correspondingly.
S102:One of the voice data and video data are set as current sync reference data, according to described Audio, video data described in current reference data playback.
In actual applications, receiving terminal can set the voice data in the audio, video data of reception or video data For current sync reference data.Assuming that receiving terminal regard voice data as reference synchronization data, receiving terminal broadcasting reference synchronization number According to when, read play current sync reference data present frame timestamp, while will in video data have it is identical or The presentation of video frames of correspondent time comes out, to reach the purpose of synchronous playing audio-video data.
In the present embodiment, follow-up step is so that current sync reference data is voice data as an example.
In addition, receiving terminal can preset a kind of reference synchronization data of reference synchronization data by default.For example, receiving terminal Can be current sync reference data by the reference synchronization data setting given tacit consent in the audio, video data of reception.
It is emphasized that the timestamp of each frame data can be relative time stamp in audio, video data.
S103:Judge whether the current sync reference data interrupts, if it is, performing S104 steps.
If it is not, then repeating step 103.
Specifically, can decide whether in the time interval of adjacent two frame data of the current sync reference data, connect Receive next frame data of current frame data.
In actual applications, because audio, video data is played by frame, so between each frame data between existence time Every.Receiving terminal can search next frame audio number in the buffer in the time interval after the present frame voice data that finishes playing According to video data frame corresponding with next frame voice data, it is assumed that do not find next frame voice data, it is determined that current same Walk reference data to interrupt, perform S104 steps.
S104:Another reference synchronization data different from current sync reference data are switched into current sync reference number According to.
For example, due in S103 steps judged result be yes, the present embodiment sound intermediate frequency data are interrupted, by video data Switch to current sync reference data.
Specifically, can also judge that whether the current sync reference data interrupts duration more than the first duration;Current In the case that reference synchronization data outage duration is more than the first duration, perform it is described will be different from current sync reference data another The step of a kind of reference synchronization data switch to current sync reference data.Duration is interrupted in current sync reference data to be no more than In the case of first duration, continuation judges that whether the current sync reference data interrupts duration more than the first duration.
For example, when the voice data as current sync reference data is interrupted, suspending playing audio-video data;Sentence Whether disconnected voice data interrupts duration more than 500 milliseconds, if it is, video data is switched into current sync reference data;And According to current sync reference data playing audio-video data.If not, whether continue audio data interrupts duration more than 500 Millisecond.
, can be in the case where current sync reference data be interrupted more than the first duration using the embodiment of the present invention, will be another One synchronous reference data switches to current sync reference data, and user can now watch silent video, or can hear Sound can't see video, all suspends broadcasting relative to Voice & Video in the prior art, improves Consumer's Experience.
If in addition, in first duration the interruption ends, current sync during the interruption ends can also be obtained The very first time stamp of reference data;Obtain the second time corresponding with very first time stamp in another reference synchronization data Stamp;When stamp commences play out the current sync reference data from the very first time, institute is commenced play out from second timestamp State another reference synchronization data.
For example, when the voice data as current sync reference data is interrupted, suspending playing audio-video data;If Voice data is interrupted to be terminated in 500 milliseconds.The timestamp at the voice data the interruption ends moment that receiving terminal is obtained is A1, is obtained Video data in to the corresponding timestamps of A1 be B1, in voice data the interruption ends, sound is commenced play out from timestamp A1 Frequency evidence, the synchronous playing video data since the timestamp B1.If the end interrupt in the first duration, does not perform S105 steps.
Using the embodiment of the present invention, another reference synchronization data can be made when current sync reference data is interrupted Frame losing catch up with the playing progress rate of current sync reference data, and then another reference synchronization data is protected with current sync reference data Hold synchronization.
S105:According to the current sync reference data after switching, the audio, video data is played.
In the present embodiment, the audio, video data received is played according to current sync reference data, i.e. video data synchronization.
, can be when being interrupted as current sync reference data using embodiment illustrated in fig. 1 of the present invention, will be another Reference synchronization data switch to the broadcasting of current sync reference data progress audio frequency and video;User can now watch noiseless regard Frequently, it or can hear that sound can't see video, all suspend broadcasting relative to Voice & Video in the prior art, improve user Experience.
Fig. 2 is second of schematic flow sheet of audio and video playing method provided in an embodiment of the present invention, shown in Fig. 2 of the present invention Embodiment adds following steps on the basis of embodiment illustrated in fig. 1:
S106:The video data is set to main reference synchronization data in advance.
In actual applications, before S101 steps, according to the setting of user or the setting of the audio frequency and video of reception, it will regard Frequency is main reference synchronization data according to setting, then the main reference synchronization data are the acquiescence reference synchronization number in S101 steps According to.
For example, being main reference synchronization by voice data setting according to the setting of user or the setting of the audio frequency and video of reception Data, then the main reference synchronization data are the acquiescence reference synchronization data in S101 steps.
S107:When the current sync reference data is not interrupted, another reference synchronization data are determined whether Whether interrupt, in the case where the voice data and the video data are not interrupted, when according to described current When the duration of audio, video data reaches the second duration described in reference synchronization data playback, judge current sync reference data whether be The main reference synchronization data, if not, performing S108.
Specifically, when the current sync reference data is not interrupted, determining whether another reference synchronization number According to whether interrupting, in the case where the audio, video data of receiving terminal is not interrupted, it is up to during playing audio-video data During by 1 second, whether be in S106 step default main synchrodata, if in S105 steps if judging current sync reference data Current sync reference data is video data, identical with default video data in S106 steps, then does not switch current sync ginseng Examine data;It is not default video data in S106 steps if current sync reference data is voice data in S105 steps, Perform S108 steps.
In actual applications, the audio, video data of reception is not interrupted, can be voice data and video data phase In the time interval of adjacent two frame data, next frame data of current frame data are received;It is also possible that voice data and/or The interruption of video data terminates in the first duration.
In practical application, if current sync reference data is not interrupted, and another reference synchronization data are interrupted, It can not generally process, return and perform step S103.
S108:The video data is switched into current sync reference data, and according to the current sync reference data Play the audio, video data.
Specifically, video data is switched into current sync reference data, the synchronous broadcasting of audio, video data is carried out.
, can be when normal play reaches the second duration, by main reference synchronization data using embodiment illustrated in fig. 2 of the present invention The broadcasting of audio frequency and video is carried out as current sync reference data.
Fig. 3 is the third schematic flow sheet of audio and video playing method provided in an embodiment of the present invention, shown in Fig. 3 of the present invention Embodiment adds following steps on the basis of embodiment illustrated in fig. 1:
S109:The voice data is set to main reference synchronization data in advance.
In actual applications, before S101 steps, according to the setting of user or the setting of the audio frequency and video of reception, by sound Frequency is main reference synchronization data according to setting, then the main reference synchronization data are the acquiescence reference synchronization number in S101 steps According to.
For example, according to the setting of user or the setting of the audio frequency and video of reception, video frequency is synchronously joined according to based on setting Examine data, then the main reference synchronization data are the acquiescence reference synchronization data in S101 steps.
S1010:When the current sync reference data is not interrupted, another reference synchronization data are determined whether Whether interrupt, in the case where the voice data and the video data are not interrupted, when according to described current When the duration of audio, video data reaches the second duration described in reference synchronization data playback, judge current sync reference data whether be The main reference synchronization data, if it is not, performing S1011.
Specifically, when the current sync reference data is not interrupted, determining whether another reference synchronization number According to whether interrupting, in the case where the audio, video data of receiving terminal is not interrupted, it is up to during playing audio-video data Whether during by 1 second, it is main reference synchronization data to judge current sync reference data, if the current sync reference in S105 steps Data are voice data, identical with default voice data in S109 steps, then do not switch current sync reference data;If Current sync reference data is video data in S109 steps, is not default voice data in S109 steps, performs S1011 steps Suddenly.
In actual applications, the audio, video data of reception is not interrupted, can be voice data and video data phase In the time interval of adjacent two frame data, next frame data of current frame data are received;It is also possible that voice data and/or The interruption of video data terminates in the first duration.
If likewise, current sync reference data is not interrupted, and another reference synchronization data are interrupted, generally It can not process, return and perform step S103.
S1011:The voice data is switched into current sync reference data, and according to the current sync reference data Play the audio, video data.
Specifically, voice data is switched into current sync reference data, the synchronous broadcasting of audio, video data is carried out.
, can be when normal play reaches the second duration, by main reference synchronization data using embodiment illustrated in fig. 3 of the present invention The broadcasting of audio frequency and video is carried out as current sync reference data.
Fig. 4 is the 4th kind of schematic flow sheet of audio and video playing method provided in an embodiment of the present invention, shown in Fig. 4 of the present invention Embodiment adds following steps on the basis of embodiment illustrated in fig. 1:
S1012:Record the switching times of current reference data.
Specifically, after step S105, record often switches the number of times of a current sync reference data, and is tired out Meter.
S1013:Judge from the current sync reference data interrupt after the 4th duration in, whether switching times reach To predetermined threshold value;If performing S1014, S103 steps are performed if it is not, returning.
Specifically, assuming in 5 minutes after current sync reference data is interrupted, the switching of current sync reference data 10 times, reach predetermined threshold value 10 times, perform S1014 steps.
Specifically, assuming in 5 minutes after current sync reference data terminal, current sync reference data have switched 7 times, It has been not up to predetermined threshold value 10 times, has performed S103 steps.
S1014:The audio, video data is synchronously played according to external clock.
Specifically, the audio, video data received is synchronously played using external clock, wherein, synchronously played using external clock Audio, video data is prior art, is repeated no more here.
, can be in the 4th duration after the interruption of current sync reference data using embodiment illustrated in fig. 4 of the present invention, switching When the number of times of current sync reference data reaches predetermined threshold value, the synchronous playing audio-video data of external clock is switched to.
Corresponding with shown in Fig. 1 of the present invention, Fig. 5 ties for the first of audio and video display device provided in an embodiment of the present invention Structure schematic diagram, applied to receiving terminal, described device can include:Receiving module 501, the first setting module 502, first judge mould Block 503, the first handover module 504 and the first playing module 505, wherein,
Receiving module 501, for receiving audio, video data, wherein, the audio, video data includes voice data and video Data.
First setting module 502, for one of the voice data and video data to be set as into current sync is joined Data are examined, the audio, video data according to the current reference data playback.
First judge module 503, for judging whether the current sync reference data interrupts.
Specifically, first judge module, specifically for judging whether in the current sync reference data adjacent two In the time interval of frame data, next frame data of current frame data are received.
First handover module 504, for that when the current sync reference data is interrupted, then will join with current sync Examine the different another reference synchronization data of data and switch to current sync reference data.
Specifically, first handover module 504, specifically for:Judge that the current sync reference data interrupts duration Whether more than the first duration;In the judge module judged result in the case of being, execution will be described to be referred to current sync The step of different another reference synchronization data of data switch to current sync reference data.
In addition, described device, which also includes first, obtains module, the second acquisition module and the second playing module, wherein, it is described First obtains module, if for the interruption ends in first duration, obtaining current sync reference during the interruption ends The very first time stamp of data;It is described second obtain module, for obtain in another reference synchronization data with the very first time The second corresponding timestamp of stamp;Second playing module, it is described current same for being commenced play out from very first time stamp When walking reference data, another reference synchronization data are commenced play out from second timestamp.
Using the embodiment of the present invention, another reference synchronization data can be made when current sync reference data is interrupted Frame losing catch up with the playing progress rate of current sync reference data, and then another reference synchronization data is protected with current sync reference data Hold synchronization.
First playing module 505, for according to the current sync reference data after switching, playing the audio, video data.
, can be when being interrupted as current sync reference data using embodiment illustrated in fig. 5 of the present invention, will be another Reference synchronization data switch to the broadcasting of current sync reference data progress audio frequency and video;User can now watch noiseless regard Frequently, it or can hear that sound can't see video, all suspend broadcasting relative to Voice & Video in the prior art, improve user Experience.
Corresponding with shown in Fig. 2 of the present invention, Fig. 6 is second of knot of audio and video display device provided in an embodiment of the present invention Structure schematic diagram.Embodiment illustrated in fig. 6 adds the judgement of the second setting module 506, second on the basis of embodiment illustrated in fig. 5 The handover module 508 of module 507 and second, wherein,
Second setting module 506, for the video data to be set into main reference synchronization data in advance.
Second judge module 507, for when the current sync reference data is not interrupted, determining whether another Plant whether reference synchronization data interrupt, in the case where the voice data and the video data are not interrupted, When the duration that the audio, video data is played according to the current sync reference data reaches the second duration, current sync is judged Whether reference data is the main reference synchronization data.
Second handover module 508, is used for, in the case where the judged result of the second judge module 507 is no, will be described Video data is set to current sync reference data, and triggers the first playing module.
, can be when normal play reaches the second duration, by main reference synchronization data using embodiment illustrated in fig. 6 of the present invention The broadcasting of audio frequency and video is carried out as current sync reference data.
Corresponding with shown in Fig. 3 of the present invention, Fig. 7 ties for the third of audio and video display device provided in an embodiment of the present invention Structure schematic diagram.Embodiment illustrated in fig. 7 adds the 3rd setting module 509, the 3rd judgement on the basis of embodiment illustrated in fig. 6 The handover module 5011 of module 5010 and the 3rd, wherein,
3rd setting module 509, for the voice data to be set into main reference synchronization data in advance.
3rd judge module 5010, it is another for when the current sync reference data is not interrupted, determining whether Whether a kind of reference synchronization data interrupt, situation about not interrupted in the voice data and the video data Under, when the duration that the audio, video data is played according to the current sync reference data reaches the second duration, judge current Whether reference synchronization data are the main reference synchronization data.
3rd handover module 5011, in the case of being no in the judged result of the 3rd judge module 5010, by institute State voice data and be set to current sync reference data, and trigger the first playing module.
, can be when normal play reaches the second duration, by main reference synchronization data using embodiment illustrated in fig. 7 of the present invention The broadcasting of audio frequency and video is carried out as current sync reference data.
Corresponding with shown in Fig. 4 of the present invention, Fig. 8 is the 4th kind of knot of audio and video display device provided in an embodiment of the present invention Structure schematic diagram, embodiment illustrated in fig. 8, on the basis of embodiment illustrated in fig. 5, adding described device also includes:Logging modle 5012nd, the 4th judge module 5013, the 3rd playing module 5014, wherein,
Logging modle 5012, the switching times for recording current reference data.
4th judge module 5013, for judge from the current sync reference data interrupt after the 4th duration Interior, whether switching times reach predetermined threshold value, in the case where the 4th judge module judges 5013 results to be, trigger institute The 3rd playing module 5014 is stated, wherein, the 3rd playing module 5014 is used to be regarded according to the external clock synchronization broadcasting sound Frequency evidence;In the case where the judged result of the 4th judge module 5013 is no, first judge module 503 is triggered;
3rd playing module 5014, for synchronously playing the audio, video data according to external clock.
, can be in the 4th duration after the interruption of current sync reference data using embodiment illustrated in fig. 8 of the present invention, switching When the number of times of current sync reference data reaches predetermined threshold value, the synchronous playing audio-video data of external clock is switched to.
It should be noted that herein, such as first and second or the like relational terms are used merely to a reality Body or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or deposited between operating In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Nonexcludability is included, so that process, method, article or equipment including a series of key elements not only will including those Element, but also other key elements including being not expressly set out, or also include being this process, method, article or equipment Intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that Also there is other identical element in process, method, article or equipment including the key element.
Each embodiment in this specification is described by the way of related, identical similar portion between each embodiment Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.It is real especially for system Apply for example, because it is substantially similar to embodiment of the method, so description is fairly simple, related part is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (14)

1. a kind of audio and video playing method, applied to receiving terminal, it is characterised in that methods described includes:
Audio, video data is received, wherein, the audio, video data includes voice data and video data;
One of the voice data and video data are set as current sync reference data, according to the current reference number According to the broadcasting audio, video data;
Judge whether the current sync reference data interrupts;
When the current sync reference data is interrupted, by another reference synchronization different from current sync reference data Data switch to current sync reference data;
According to the current sync reference data after switching, the audio, video data is played.
2. according to the method described in claim 1, it is characterised in that it is described judge the current sync reference data whether in It is disconnected, including:
Judge whether in the time interval of adjacent two frame data of the current sync reference data, receive current frame data Next frame data.
3. according to the method described in claim 1, it is characterised in that described to be interrupted in the current sync reference data When, another reference synchronization data different from current sync reference data are switched into current sync reference data, including:
Judge that whether the current sync reference data interrupts duration more than the first duration;
Current sync is switched to join another reference synchronization data different from current sync reference data if so, execution is described The step of examining data.
4. method according to claim 3, it is characterised in that methods described also includes:
If the interruption ends in first duration, obtain the interruption ends when the current sync reference data first when Between stab;
Obtain the second timestamp corresponding with very first time stamp in another reference synchronization data;
When stamp commences play out the current sync reference data from the very first time, institute is commenced play out from second timestamp State another reference synchronization data.
5. according to the method described in claim 1, it is characterised in that methods described also includes:
The video data is set to main reference synchronization data in advance;
When the current sync reference data is not interrupted, in determining whether whether another reference synchronization data occur It is disconnected, in the case where the voice data and the video data are not interrupted, when according to the current sync reference number Whether when reaching the second duration according to the duration for playing the audio, video data, it is the main synchronization to judge current sync reference data Reference data;
If it is not, the video data is switched into current sync reference data, and played according to the current sync reference data The audio, video data.
6. according to the method described in claim 1, it is characterised in that methods described also includes:
The voice data is set to main reference synchronization data in advance;
When the current sync reference data is not interrupted, in determining whether whether another reference synchronization data occur It is disconnected, in the case where the voice data and the video data are not interrupted, when according to the current sync reference number Whether when reaching the second duration according to the duration for playing the audio, video data, it is the main synchronization to judge current sync reference data Reference data;
If it is not, the voice data is switched into current sync reference data, and played according to the current sync reference data The audio, video data.
7. according to the method described in claim 1, it is characterised in that the current sync reference data after according to switching, play After the audio, video data, in addition to:
Record the switching times of current reference data;
Judge from the current sync reference data interrupt after the 4th duration in, whether switching times reach default threshold Value;
If so, synchronously playing the audio, video data according to external clock;
If it is not, return is described to judge the step of whether the current sync reference data interrupts.
8. a kind of audio and video display device, applied to receiving terminal, it is characterised in that described device includes:Receiving module, first set Cover half block, the first judge module, the first handover module and the first playing module, wherein,
The receiving module, for receiving audio, video data, wherein, the audio, video data includes voice data and video counts According to;
First setting module, for one of the voice data and video data to be set as into current sync reference number According to the audio, video data according to the current reference data playback;
First judge module, for judging whether the current sync reference data interrupts;
First handover module, will be with current sync reference number for when the current sync reference data is interrupted Current sync reference data is switched to according to different another reference synchronization data;
First playing module, for according to the current sync reference data after switching, playing the audio, video data.
9. device according to claim 8, it is characterised in that the judge module, specifically for:
Judge whether in the time interval of adjacent two frame data of the current sync reference data, receive current frame data Next frame data.
10. device according to claim 8, it is characterised in that first handover module, specifically for:
Judge that whether the current sync reference data interrupts duration more than the first duration;
In the judge module judged result in the case of being, perform it is described will be different from current sync reference data another Plant the step of reference synchronization data switch to current sync reference data.
11. device according to claim 10, it is characterised in that described device is also obtained including the first acquisition module, second Module and the second playing module are obtained, wherein,
Described first obtains module, if for the interruption ends in first duration, it is described current during acquisition the interruption ends The very first time stamp of reference synchronization data;
Described second obtains module, for obtaining corresponding with very first time stamp second in another reference synchronization data Timestamp;
Second playing module, for from when the very first time, stamp commenced play out the current sync reference data, from institute State the second timestamp and commence play out another reference synchronization data.
12. device according to claim 8, it is characterised in that described device also includes:Second setting module, second are sentenced Disconnected module and the second handover module, wherein,
Second setting module, for the video data to be set into main reference synchronization data in advance;
Second judge module, for when the current sync reference data is not interrupted, determining whether another Whether reference synchronization data interrupt, in the case where the voice data and the video data are not interrupted, when When the duration for playing the audio, video data according to the current sync reference data reaches the second duration, judge that current sync is joined Whether examine data is the main reference synchronization data;
Second handover module, in the case of being no in the second judge module judged result, by the video counts According to switching to current sync reference data, and trigger the first playing module.
13. device according to claim 8, it is characterised in that described device also includes:3rd setting module, the 3rd sentence Disconnected module and the 3rd handover module, wherein,
3rd setting module, for the voice data to be set into main reference synchronization data in advance;
3rd judge module, for when the current sync reference data is not interrupted, determining whether another Whether reference synchronization data interrupt, in the case where the voice data and the video data are not interrupted, when When the duration for playing the audio, video data according to the current sync reference data reaches the second duration, judge that current sync is joined Whether examine data is the main reference synchronization data;
3rd handover module, in the case of being no in the 3rd judge module judged result, by the audio number According to being set to current sync reference data, and trigger the first playing module.
14. device according to claim 8, it is characterised in that described device also includes:Logging modle, the 4th judge mould Block, the 3rd playing module, wherein,
The logging modle, the switching times for recording current reference data;
4th judge module, for judge from the current sync reference data interrupt after the 4th duration in, cut Change whether number of times reaches predetermined threshold value, in the 4th judge module judged result in the case of being, triggering the described 3rd is broadcast Amplification module, wherein, the 3rd playing module is used to synchronously play the audio, video data according to external clock;The described 4th In the case that judge module judged result is no, first judge module is triggered.
CN201710204716.7A 2017-03-30 2017-03-30 A kind of audio and video playing method and device Pending CN107155126A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710204716.7A CN107155126A (en) 2017-03-30 2017-03-30 A kind of audio and video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710204716.7A CN107155126A (en) 2017-03-30 2017-03-30 A kind of audio and video playing method and device

Publications (1)

Publication Number Publication Date
CN107155126A true CN107155126A (en) 2017-09-12

Family

ID=59793638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710204716.7A Pending CN107155126A (en) 2017-03-30 2017-03-30 A kind of audio and video playing method and device

Country Status (1)

Country Link
CN (1) CN107155126A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107734376A (en) * 2017-10-16 2018-02-23 维沃移动通信有限公司 The method and device that a kind of multi-medium data plays
EP3748972A4 (en) * 2019-04-24 2020-12-09 Wangsu Science & Technology Co., Ltd. Video recording method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607815A (en) * 2003-10-15 2005-04-20 松下电器产业株式会社 AV synchronization system
CN101500170A (en) * 2008-01-28 2009-08-05 联发科技股份有限公司 Method for compensating timing mismatch in a/v data stream
CN201341185Y (en) * 2009-01-22 2009-11-04 大连捷成实业发展有限公司 Functional framework for video-audio signal processing platform
CN103119952A (en) * 2010-09-22 2013-05-22 汤姆逊许可公司 Methods for processing multimedia flows and corresponding devices
CN103686315A (en) * 2012-09-13 2014-03-26 深圳市快播科技有限公司 Synchronous audio and video playing method and device
CN103747316A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Audio and video synchronizing method and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1607815A (en) * 2003-10-15 2005-04-20 松下电器产业株式会社 AV synchronization system
CN101500170A (en) * 2008-01-28 2009-08-05 联发科技股份有限公司 Method for compensating timing mismatch in a/v data stream
CN201341185Y (en) * 2009-01-22 2009-11-04 大连捷成实业发展有限公司 Functional framework for video-audio signal processing platform
CN103119952A (en) * 2010-09-22 2013-05-22 汤姆逊许可公司 Methods for processing multimedia flows and corresponding devices
CN103686315A (en) * 2012-09-13 2014-03-26 深圳市快播科技有限公司 Synchronous audio and video playing method and device
CN103747316A (en) * 2013-12-23 2014-04-23 乐视致新电子科技(天津)有限公司 Audio and video synchronizing method and electronic device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107734376A (en) * 2017-10-16 2018-02-23 维沃移动通信有限公司 The method and device that a kind of multi-medium data plays
EP3748972A4 (en) * 2019-04-24 2020-12-09 Wangsu Science & Technology Co., Ltd. Video recording method and system
US10951857B2 (en) 2019-04-24 2021-03-16 Wangsu Science & Technology Co., Ltd. Method and system for video recording

Similar Documents

Publication Publication Date Title
CN107509100A (en) Audio and video synchronization method, system, computer installation and computer-readable recording medium
CN100579238C (en) Synchronous playing method for audio and video buffer
KR100298963B1 (en) Method and apparatus for acquiring and overcoming carried audio data in a packetized data stream
KR101228177B1 (en) Synchronized audio/video decoding for network devices
US7508760B2 (en) Data distribution server and terminal apparatus
US8582947B2 (en) Method and apparatus for processing video and audio data received in decoding system
CN105791939B (en) The synchronous method and device of audio & video
US9621949B2 (en) Method and apparatus for reducing latency in multi-media system
CN102364952B (en) Method for processing audio and video synchronization in simultaneous playing of plurality of paths of audio and video
US7245608B2 (en) Codec aware adaptive playout method and playout device
US6449352B1 (en) Packet generating method, data multiplexing method using the same, and apparatus for coding and decoding of the transmission data
CN107995503B (en) Audio and video playing method and device
CN103546662A (en) Audio and video synchronizing method in network monitoring system
CN107241640A (en) The method that a kind of mobile device and television equipment are synchronously played
CN101682741A (en) Stream transmission server and stream transmission system
CN106604064A (en) Rapid broadcasting method and device
US20040143675A1 (en) Resynchronizing drifted data streams with a minimum of noticeable artifacts
CN107155126A (en) A kind of audio and video playing method and device
CN107770569A (en) Multimedia synchronous broadcast method, apparatus and system
CN109905749A (en) Video broadcasting method and device, storage medium and electronic device
CN107197394A (en) A kind of method of video playback sound intermediate frequency switching
CN110519627A (en) A kind of synchronous method and device of audio data
WO2008031293A1 (en) A method for quickly playing the multimedia broadcast channels
CN103517044B (en) Video conference device and the method for lip-sync thereof
CN101137066B (en) Multimedia data flow synchronous control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170912