Calculate the method and system of vision signal time offset
Technical field
The present invention relates to technical field of video processing, more particularly to a kind of method for calculating vision signal time offset and
System.
Background technology
With the development of direct seeding technique, during live telecast, the interaction in TV between personage and televiewer is needed
Ask more and more, the characteristics of due to transmission of video, for the vision signal of current live, using different broadcasting channels, it is regarded
Frequency delay is different, leads to not realize the accurate interaction between TV and televiewer, and the effect of TV interaction is very low.For example
The program of satellite television is that, by satellite transmission, after live signal is launched microwave tower int the sky by signal source, broadcasting agency is needed different
Ground receives TV signal using DVB, then transcoding is carried out to TV signal by live transcoder, by CDN
TV signal is distributed to specified user, user is played TV signal by television terminal, this process introduces many time delays.
, it is necessary to carry out interaction according to content in many live video interactive applications, but requirement can not change video hair
Generating apparatus, that is to say, that broadcasting chain can not do the change based on video data stream.IPTV transmission links are found after analysis
In time delay can ignore, dominating delay is exported from satellite reception to live transcoding, in the prior art, solves this problem needs
Timing is carried out manually and adjustment judges that TV signal sends the time offset between microwave tower int the sky and broadcasting signal, and it is this inclined
Shifting amount this side-play amount when there is brodasting breakup, such as live transcoder failover is also required to manual correction again, brings higher
Cost of labor, larger inconvenience is brought to business.
Therefore, prior art needs to improve.
The content of the invention
The invention discloses a kind of method and system for calculating vision signal time offset, it is used to solve prior art to deposit
Problem.
One side based on the embodiment of the present invention, discloses a kind of method for calculating vision signal time offset, bag
Include:
Source signal is accessed, the temporal characteristics that searching system obtains source signal are gathered by information source temporal characteristics;
Calculate the signal time side-play amount that information source temporal characteristics collection searching system is returned;
Broadcasting signal is accessed, the temporal characteristics of broadcasting signal are obtained by broadcasting signal temporal characteristics acquisition system;
The temporal characteristics of broadcasting signal are uploaded to information source temporal characteristics collection searching system, and return to broadcast time side-play amount;
Signal cutout detection is carried out, broadcasting signal time signal feature is reacquired.
In another embodiment of the method based on above-mentioned calculating vision signal time offset, the source signal
Temporal characteristics include:When the natural time of source signal, source signal PTS timestamps, information source audio PTS, information source audio are natural
Between and source signal audio-frequency fingerprint.
In another embodiment of the method based on above-mentioned calculating vision signal time offset, the broadcasting signal
Temporal characteristics include:The natural time of broadcasting signal, broadcasting signal PTS timestamps, broadcast audio PTS and broadcasting signal audio refers to
Line.
In another embodiment of the method based on above-mentioned calculating vision signal time offset, the acquisition information source letter
Number temporal characteristics include:
Source signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time of recorded this signal, the natural time is designated as N1,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N1 and frame are VPTS1, then extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS1 is designated as, the nature of this section audio is recorded
Time:M1=N1+(APTS1-VPTS1);
Calculate audio-frequency fingerprint F;
By audio-frequency fingerprint, natural time M1, that audio duration is loaded onto internal memory is for future reference.
In another embodiment of the method based on above-mentioned calculating vision signal time offset, broadcasting signal is obtained
Temporal characteristics include:
Broadcasting signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time N2 of recorded this road signal,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N2 and frame are VPTS2, extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS2 is designated as, audio-frequency fingerprint F is calculated;
Form audio-frequency fingerprint F, natural time M2, audio duration composition data pair.
In another embodiment of the method based on above-mentioned calculating vision signal time offset, during the calculating information source
Between collection apparatus searching system return signal time side-play amount be:
Time offset Delta=(M2+Y)-(M1+X);
X and Y are respectively the time offset of natural time M1 and natural time M2 to the audio-frequency fingerprint.
Other side based on the embodiment of the present invention, discloses a kind of system for calculating vision signal time offset,
Including:Information source temporal characteristics gather searching system and broadcasting signal temporal characteristics acquisition system;
The information source temporal characteristics collection searching system is used to gather the temporal characteristics of source signal, and calculates audio-frequency fingerprint, meter
The time offset of source signal is calculated, audio-frequency fingerprint, audio natural time, the audio duration information of source signal is stored;
The broadcasting signal temporal characteristics acquisition system is used to gather the temporal characteristics of broadcasting signal, calculates audio-frequency fingerprint, record
The frequency fingerprint of broadcasting signal, audio natural time, audio duration information, and information source temporal characteristics collection searching system is uploaded to,
Time offset according to source signal draws the time offset of broadcasting signal.
In another embodiment of the system based on above-mentioned calculating vision signal time offset, the information source time is special
The temporal characteristics for levying collection searching system collection source signal include:
Source signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time of recorded this signal, the natural time is designated as N1,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N1 and frame are VPTS1, then extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS1 is designated as, the nature of this section audio is recorded
Time:M1=N1+(APTS1-VPTS1);
Calculate audio-frequency fingerprint F;
By audio-frequency fingerprint, natural time M1, that audio duration is loaded onto internal memory is for future reference.
In another embodiment of the system based on above-mentioned calculating vision signal time offset, during the broadcasting signal
Between the temporal characteristics of collection apparatus system acquisition broadcasting signal include:
Broadcasting signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time N2 of recorded this road signal,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N2 and frame are VPTS2, extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS2 is designated as, audio-frequency fingerprint F is calculated;
Form audio-frequency fingerprint F, natural time M2, audio duration composition data pair.
In another embodiment of the system based on above-mentioned calculating vision signal time offset, the source signal
Temporal characteristics include:When the natural time of source signal, source signal PTS timestamps, information source audio PTS, information source audio are natural
Between and source signal audio-frequency fingerprint.
In another embodiment of the system based on above-mentioned calculating vision signal time offset, the broadcasting signal
Temporal characteristics include:The natural time of broadcasting signal, broadcasting signal PTS timestamps, broadcast audio PTS and broadcasting signal audio refers to
Line.
Compared with prior art, the present invention has advantages below:
The present invention gathers searching system and broadcasting signal temporal characteristics acquisition system automatic data collection information source by information source temporal characteristics
Signal time feature and play signal temporal characteristics, and calculate the time migration of the time offset and play signal of source signal
Amount, is stopped by signal and detected, reacquires broadcasting signal time signal feature, realizes that the no-delay of vision signal is broadcast in real time
Put, the effective interaction of user and TV programme can be met.
Below by drawings and Examples, technical scheme is described in further detail.
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 in technology description to do one simply to introduce.
Fig. 1 is the structural representation of one embodiment of the system of calculating vision signal time offset of the invention;
Fig. 2 is the flow chart of one embodiment of the method for calculating vision signal time offset of the invention;
Fig. 3 is the flow chart of another embodiment of the method for calculating vision signal time offset of the invention;
Fig. 4 is the flow chart of another embodiment of the method for calculating vision signal time offset of the invention.
Specific embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
Only it is a part of embodiment of the invention, rather than whole embodiments.
Based on the embodiment in the present invention, those of ordinary skill in the art are obtained under the premise of creative work is not made
The every other embodiment for obtaining, belongs to the scope of protection of the invention.
Fig. 1 is the structural representation of one embodiment of the system of calculating vision signal time offset of the invention, such as
Shown in Fig. 1, the system for calculating vision signal time offset includes:
Information source temporal characteristics gather searching system 1 and broadcasting signal temporal characteristics acquisition system 2;
The information source temporal characteristics collection searching system 1 is used to gather the temporal characteristics of source signal, and calculates audio-frequency fingerprint, meter
The time offset of source signal is calculated, audio-frequency fingerprint, audio natural time, the audio duration information of source signal is stored;
The broadcasting signal temporal characteristics acquisition system 2 is used to gather the temporal characteristics of broadcasting signal, calculates audio-frequency fingerprint, record
The frequency fingerprint of broadcasting signal, audio natural time, audio duration information, and information source temporal characteristics collection searching system 1 is uploaded to,
Time offset according to source signal draws the time offset of broadcasting signal.
The temporal characteristics of the information source temporal characteristics collection searching system 1 collection source signal include:
Source signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time of recorded this signal, the natural time is designated as N1,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N1 and frame are VPTS1, then extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS1 is designated as, the nature of this section audio is recorded
Time:M1=N1+(APTS1-VPTS1);
Calculate audio-frequency fingerprint F;
By audio-frequency fingerprint, natural time M1, that audio duration is loaded onto internal memory is for future reference.
The temporal characteristics of the collection of broadcasting signal temporal characteristics acquisition system 2 broadcasting signal include:
Broadcasting signal is accessed, and parses stream medium data, isolates video/audio signal;
Judge whether the natural time N2 of recorded this road signal,
If so, voice data is extracted,
If it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as certainly
The PTS time stabs of right time N2 and frame are VPTS2, extract voice data;
Voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS2 is designated as, audio-frequency fingerprint F is calculated;
Form audio-frequency fingerprint F, natural time M2, audio duration composition data pair.
The temporal characteristics of the source signal include:The natural time of source signal, source signal PTS timestamps, information source
Audio PTS, information source audio natural time and source signal audio-frequency fingerprint.
The temporal characteristics of the broadcasting signal include:The natural time of broadcasting signal, broadcasting signal PTS timestamps, broadcast
Audio PTS and broadcasting signal audio-frequency fingerprint.
Fig. 2 is the flow chart of one embodiment of the method for calculating vision signal time offset of the invention, such as Fig. 2 institutes
Show, the method for calculating vision signal time offset includes:
10, source signal is accessed, gather the temporal characteristics that searching system 1 obtains source signal by information source temporal characteristics;
20, calculate the signal time side-play amount that information source temporal characteristics collection searching system 1 is returned;
30, broadcasting signal is accessed, the temporal characteristics of broadcasting signal are obtained by broadcasting signal temporal characteristics acquisition system 2;
40, the temporal characteristics of broadcasting signal are uploaded to information source temporal characteristics collection searching system 1, and return to broadcast time skew
Amount;
50, signal cutout detection is carried out, reacquire broadcasting signal time signal feature.
The temporal characteristics of the source signal include:The natural time of source signal, source signal PTS timestamps, information source
Audio PTS, information source audio natural time and source signal audio-frequency fingerprint.
The temporal characteristics of the broadcasting signal include:The natural time of broadcasting signal, broadcasting signal PTS timestamps, broadcast
Audio PTS and broadcasting signal audio-frequency fingerprint.
Fig. 3 is the flow chart of another embodiment of the method for calculating vision signal time offset of the invention, such as Fig. 3
Shown, the temporal characteristics for obtaining source signal include:
11, source signal is accessed, and parses stream medium data, isolates video/audio signal;
12, judge whether the natural time of recorded this signal, the natural time is designated as N1,
13, if so, voice data is extracted,
14, if it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as
The PTS time stabs of natural time N1 and frame are VPTS1, then extract voice data;
15, voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS1 is designated as, record this section audio
Natural time:M1=N1+(APTS1-VPTS1);
16, calculate audio-frequency fingerprint F;
17, by audio-frequency fingerprint, natural time M1, that audio duration is loaded onto internal memory is for future reference.
Fig. 4 is the flow chart of another embodiment of the method for calculating vision signal time offset of the invention, such as Fig. 4
Shown, the temporal characteristics for obtaining broadcasting signal include:
31, broadcasting signal is accessed, and parses stream medium data, isolates video/audio signal;
32, judge whether the natural time N2 of recorded this road signal,
33, if so, voice data is extracted,
34, if it is not, checking whether the independent video requency frame data of appearance, the time that independent video requency frame data occurs in first time is recorded as
The PTS time stabs of natural time N2 and frame are VPTS2, extract voice data;
35, voice data is decoded, PCM data is generated, corresponding audio PTS is extracted, APTS2 is designated as, calculate audio-frequency fingerprint F;
36, form audio-frequency fingerprint F, natural time M2, audio duration composition data pair.
It is described to calculate the signal time side-play amount that information source temporal characteristics collection searching system returns and be:
Time offset Delta=(M2+Y)-(M1+X);
X and Y are respectively the time offset of natural time M1 and natural time M2 to the audio-frequency fingerprint.
Finally it should be noted that:The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention,
Although being described in detail to the present invention with reference to the foregoing embodiments, for a person skilled in the art, it still may be used
Modified with to the technical scheme described in foregoing embodiments, or equivalent carried out to which part technical characteristic,
All any modification, equivalent substitution and improvements within the spirit and principles in the present invention, made etc., should be included in of the invention
Within protection domain.