CN1917652A - Method for playing back audio/video of network stream media synchronously - Google Patents

Method for playing back audio/video of network stream media synchronously Download PDF

Info

Publication number
CN1917652A
CN1917652A CNA2006100217733A CN200610021773A CN1917652A CN 1917652 A CN1917652 A CN 1917652A CN A2006100217733 A CNA2006100217733 A CN A2006100217733A CN 200610021773 A CN200610021773 A CN 200610021773A CN 1917652 A CN1917652 A CN 1917652A
Authority
CN
China
Prior art keywords
video
audio
data
working area
timer
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
CNA2006100217733A
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CNA2006100217733A priority Critical patent/CN1917652A/en
Publication of CN1917652A publication Critical patent/CN1917652A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The technical solution provided is to add an audio/video buffer and set an audio/video timer into the currently-used IP stream media displaying device in order to control the display of audio/video data in the buffer and to improve the synchronizing precision between audio and video signal.

Description

IP network stream medium audio and video synchronous broadcast method
Technical field
The present invention relates to the IP network technology, particularly IP network stream medium audio and video simultaneous techniques.
Background technology
Along with the development of household electrical appliances, communication, consumer electronics 3C unification main trend, the stream media play system of IP based network becomes focus gradually.In IP network streaming media playing technology, how correctly recover time relationship between the audio ﹠ video at receiving terminal, realize that promptly audio-visual synchronization plays, become one of key technology.
In the prior art, terminal just begins constantly to receive the media data packet of automatic network after the beginning streaming media playing (program request or multicast).At this moment handling process following (video with medium is mpeg4, and audio frequency is that mp3 is an example):
(1) at first judges medium type, learn that it is the audio or video medium of which kind of form by RTP Payload (RTP load);
(2), media data and pts (time tag) thereof are delivered to audio or video buffering area in the internal memory according to medium type;
(3) a. is after video data reaches some in the screen buffer, and the opening timing device is sent to Video Decoder according to the pts of video data and handles, and output video;
(3) b. is after voice data reaches some in the audio buffer, the opening timing device is according to the pts of voice data, with mp3 original audio data decoding in the audio buffer, and the PCM data of decoding output are delivered to audio chip/sound card handle, and output audio.Playing flow is referring to Fig. 1.
Since the complicated factor of IP network transmission data, above-mentioned streaming media playing process, the audio-visual synchronization precision is uncertain, and random error is big, and synchronous effect is barely satisfactory.
And the correlation technique of existing audio-visual synchronization mainly is confined to the Play System of unit, and is not suitable for the multimedia play system under the network environment.
Summary of the invention
Technical problem to be solved by this invention just provides a kind of simplely, and the audio and video synchronization method of the streaming media playing of effective IP based network effectively ensures the precision and the effect of audio-visual synchronization under the network environment.
The present invention solve the technical problem, and the technical scheme of employing is that IP network stream medium audio and video synchronous broadcast method may further comprise the steps:
I. receiving network data bag;
II. read the RTP data;
III., audio frequency working area and video working area are set, to depositing described working area in after the rearrangement of RTP data;
IV., audio frequency timer and video timer are set, respectively control audio working area data and video working area data playback speed;
V. according to the pts order of audio, video data, audio, video data is sent into buffering area from above-mentioned working area;
VI. carry out playback process from the buffering area reading of data.
The invention has the beneficial effects as follows,, the audio, video data broadcasting speed is controlled respectively, can greatly improve the audio-visual synchronization precision, improve the streaming media playing effect by timer owing to increased the working area.The synchronous flow process of the present invention is simple, realizes easily.
Description of drawings
Fig. 1 is a prior art streaming media playing flow process;
Fig. 2 is the playing flow of the embodiment of the invention;
Fig. 3 embodiment sound intermediate frequency timer control flow;
Video timer control flow among Fig. 4 embodiment.
Embodiment
Below in conjunction with drawings and Examples, describe technical scheme of the present invention in detail.
Technical scheme of the present invention is that IP network stream medium audio and video synchronous broadcast method may further comprise the steps:
I. receiving network data bag;
II. read the RTP data, judge medium type;
III., audio frequency working area and video working area are set, to depositing described working area in after the rearrangement of RTP data;
IV., audio frequency timer and video timer are set, respectively control audio working area data and video working area data playback speed;
V. according to the pts order of audio, video data, audio, video data is sent into buffering area from above-mentioned working area;
VI. carry out playback process from the buffering area reading of data;
Further be, among the described step IV, when audio frequency working area data reach set point, adjust the audio frequency timer, increase the voice data broadcasting speed;
Concrete set point is 85%;
Perhaps, among the described step IV, carry out following steps:
A1. the threshold value of setting audio timer is At;
A2. calculate the difference of the video pts and the audio frequency pts of current broadcast, when described difference>At, adjust the audio frequency timer, increase the voice data broadcasting speed;
Further be, increased the voice data broadcasting speed after, when video working area data reach predetermined value, audio calibration data playback Velocity Reference again; Concrete predetermined value is made as 85%.
The control of video timer is among the described step IV, when video working area data reach set point, to adjust the video timer, increase video data broadcasting speed;
Concrete set point is 85%;
Perhaps, among the described step IV, carry out following steps:
V1. the threshold value of setting the video timer is Vt;
V2. calculate the difference of the audio frequency pts and the video pts of current broadcast, when described difference>Vt, adjust the video timer, increase the video data broadcasting speed;
After increasing the video data broadcasting speed, when audio frequency working area data reach predetermined value, suspend playing video data;
Concrete predetermined value is made as 85%.
Embodiment
This routine streaming media playing flow process as shown in Figure 2.
Behind the media data of receiving automatic network, be pressed into a working area, and be not pushed directly to the buffering area of audio/video.In the working area, it is resequenced according to the sequence number of packet.Afterwards, regularly visit this working area, data are got in the buffering area of timbre/video by the audio frequency and video timer.
Audio frequency and video of the present invention synchronously, mainly be to realize the reference time by obtaining the every frame data of video data that streaming media server sends and the reference time of each packets of audio data.Because the progress of the data that streaming media server is sent is synchronous with the actual play progress substantially, therefore mainly the Voice ﹠ Video timer is controlled, thereby reached the purpose of controlling the audio frequency and video broadcasting speed in end side.
The threshold value of pts time difference that preestablishes the audio ﹠ video of current broadcast is 100ms, i.e. the asynchronous 100ms that is no more than of the time of audio frequency and video.This value is the reference value in the timer control algolithm of back.
The control flow of audio frequency timer as shown in Figure 3.
Under the default situations, voice playing speed is consistent with its fiducial value.
Read voice data at every turn, calculate the time difference of the pts of the video of current broadcast and audio frequency, under two kinds of conditions, make voice playing faster then:
(1) the audio frequency working area is soon full (reach working area 85%);
(2) the pts time difference of video and voice playing is greater than threshold value 100ms.
Wherein, under second kind of situation, if video working area also soon full (reach working area 85%), then appropriateness increases the fiducial value of voice playing, and this value voice playing speed to later before revising once more is all effective.
The partial reference code is as follows:
int?va_gap;
long?video_pts,audio_pts;
va_gap=video_pts-audio_pts。
Under other situation, by the normal speed forward audio frequency.
Fig. 4 shows video timer control flow.
The algorithm of video timer is basic consistent with audio frequency timer algorithm.Fetch video data at every turn, calculate time difference of pts of the audio ﹠ video of current broadcast, under two kinds of conditions, make video playback faster then:
(1) the video working area is soon full (reach working area 85%);
(2) the pts time difference of audio ﹠ video broadcast is greater than threshold value 100ms.
Wherein, under second kind of situation, if video working area also soon full (reach working area 85%), then this not from the working area reading video data to screen buffer, postpone to play this frame video data simultaneously.
Under other situation, by the normal speed forward video.

Claims (11)

1.IP the network flow-medium audio and video synchronization playing method may further comprise the steps:
I. receiving network data bag;
II. read the RTP data;
III., audio frequency working area and video working area are set, to depositing described working area in after the rearrangement of RTP data;
IV., audio frequency timer and video timer are set, respectively control audio working area data and video working area data playback speed;
V. according to the pts order of audio, video data, audio, video data is sent into buffering area from above-mentioned working area;
VI. carry out playback process from the buffering area reading of data.
2. IP network stream medium audio and video synchronous broadcast method according to claim 1 is characterized in that, among the described step IV, when audio frequency working area data reach set point, adjusts the audio frequency timer, increases the voice data broadcasting speed.
3. IP network stream medium audio and video synchronous broadcast method according to claim 2 is characterized in that described set point is 85%.
4. IP network stream medium audio and video synchronous broadcast method according to claim 1 is characterized in that, among the described step IV, carries out following steps:
A1. the threshold value of setting audio timer is At;
A2. calculate the difference of the video pts and the audio frequency pts of current broadcast, when described difference>At, adjust the audio frequency timer, increase the voice data broadcasting speed.
5. according to claim 2,3 or 4 described IP network stream medium audio and video synchronous broadcast methods, it is characterized in that, among the described step IV, when video working area data reach predetermined value, audio calibration data playback Velocity Reference again.
6. IP network stream medium audio and video synchronous broadcast method according to claim 5 is characterized in that described predetermined value is 85%.
7. IP network stream medium audio and video synchronous broadcast method according to claim 1 is characterized in that, among the described step IV, when video working area data reach set point, adjusts the video timer, increases the video data broadcasting speed.
8. IP network stream medium audio and video synchronous broadcast method according to claim 7 is characterized in that described set point is 85%.
9. IP network stream medium audio and video synchronous broadcast method according to claim 1 is characterized in that, among the described step IV, carries out following steps:
V1. the threshold value of setting the video timer is Vt;
V2. calculate the difference of the audio frequency pts and the video pts of current broadcast, when described difference>Vt, adjust the video timer, increase the video data broadcasting speed.
10. according to claim 7,8 or 9 described IP network stream medium audio and video synchronous broadcast methods, it is characterized in that, among the described step IV, when audio frequency working area data reach predetermined value, suspend playing video data.
11. IP network stream medium audio and video synchronous broadcast method according to claim 10 is characterized in that described predetermined value is 85%.
CNA2006100217733A 2006-09-07 2006-09-07 Method for playing back audio/video of network stream media synchronously Pending CN1917652A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2006100217733A CN1917652A (en) 2006-09-07 2006-09-07 Method for playing back audio/video of network stream media synchronously

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2006100217733A CN1917652A (en) 2006-09-07 2006-09-07 Method for playing back audio/video of network stream media synchronously

Publications (1)

Publication Number Publication Date
CN1917652A true CN1917652A (en) 2007-02-21

Family

ID=37738515

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2006100217733A Pending CN1917652A (en) 2006-09-07 2006-09-07 Method for playing back audio/video of network stream media synchronously

Country Status (1)

Country Link
CN (1) CN1917652A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916163A (en) * 2010-08-02 2010-12-15 周寅 Method for keeping interactive playing of cooperative and gradually-variational panoramic video under space-time transformation
CN101945124A (en) * 2010-08-19 2011-01-12 周寅 Method for downloading videos during roaming in micro-video and peer-to-peer network-based virtual network map
WO2013082965A1 (en) * 2011-12-05 2013-06-13 优视科技有限公司 Streaming media data processing method and apparatus and streaming media data reproducing device
CN105516090A (en) * 2015-11-27 2016-04-20 刘军 Media play method, device and music teaching system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916163A (en) * 2010-08-02 2010-12-15 周寅 Method for keeping interactive playing of cooperative and gradually-variational panoramic video under space-time transformation
CN101945124A (en) * 2010-08-19 2011-01-12 周寅 Method for downloading videos during roaming in micro-video and peer-to-peer network-based virtual network map
CN101945124B (en) * 2010-08-19 2012-12-12 周寅 Method for downloading videos during roaming in micro-video and peer-to-peer network-based virtual network map
WO2013082965A1 (en) * 2011-12-05 2013-06-13 优视科技有限公司 Streaming media data processing method and apparatus and streaming media data reproducing device
US8670072B1 (en) 2011-12-05 2014-03-11 Guangzhou Ucweb Computer Technology Co., Ltd Method and apparatus for streaming media data processing, and streaming media playback equipment
CN105516090A (en) * 2015-11-27 2016-04-20 刘军 Media play method, device and music teaching system
CN105516090B (en) * 2015-11-27 2019-01-22 刘军 Media playing method, equipment and music lesson system

Similar Documents

Publication Publication Date Title
JP6016778B2 (en) How to recover content streamed in chunks
TWI668982B (en) Method and server device for transport interface for multimedia and file transport, and computer-readable storage medium for recording related instructions thereon
US20190260816A1 (en) Content Delivery
JP5937275B2 (en) Replace lost media data for network streaming
CN102177691B (en) Reduce the system and method for media stream delay
CN101075949A (en) Method for changing fluid-medium file broadcasting speed
CN1293871A (en) Decoder buffer for streaming video receiver
US8244897B2 (en) Content reproduction apparatus, content reproduction method, and program
TW202037177A (en) Service description for streaming media data
CN1764974A (en) The storage medium of storage multi-medium data and the method and apparatus of multimedia rendering data
CN1742492A (en) Automatic synchronization of audio and video based media services of media content
CN101064669A (en) Network real-time playing multimedia data method
CN101047842A (en) Method for playing flow media audio-vedio on radio binary operation environment mobile phone
CN1893572A (en) Insertion-type media player for use in network television-set top-set-box
CN101068210A (en) Multimedia data transmitting method
CN1710963A (en) Data synchronization method and apparatus for digital multimedia data receiver
CN1622616A (en) A broadcast method and system for digital program
CN101394252A (en) Data transmission method based on RTP
CN1678019A (en) Data synchronousely regenerating device and terminal device
CN1148931C (en) Method for implementing stream medium transmission based on real time transmission protocol and transmission control protocol
CN1917652A (en) Method for playing back audio/video of network stream media synchronously
CN101076105A (en) Method, apparatus and system for predicting network TV-set programm
US11050805B2 (en) Method of controlling stream buffer in media playback device and related buffering device
CN1859525A (en) Method for realizing stream media switching and stream media server
CN1812591A (en) System and method for performing signal synchronization of data streams

Legal Events

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