CN101312534A - Code rate smoothing method and apparatus of time division stream media - Google Patents
Code rate smoothing method and apparatus of time division stream media Download PDFInfo
- Publication number
- CN101312534A CN101312534A CNA2007100995221A CN200710099522A CN101312534A CN 101312534 A CN101312534 A CN 101312534A CN A2007100995221 A CNA2007100995221 A CN A2007100995221A CN 200710099522 A CN200710099522 A CN 200710099522A CN 101312534 A CN101312534 A CN 101312534A
- Authority
- CN
- China
- Prior art keywords
- video flowing
- memory
- time
- interval
- frame
- 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.)
- Granted
Links
Images
Landscapes
- Time-Division Multiplex Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention provides a bit rate smoothing method of time division flow media and a device. The method comprises: every a preset time interval, picking a received video stream to be stored in a buffer memory; every a preset time interval, according to the interval of the time stamps of the video stream received in last time, picking corresponding audio bit stream data, packaging the audio bit stream data and the video stream received in last time into one time division frame. The invention adopts buffer mechanism to smooth the media flow bit rate and realize the little difference between the intervals of the time stamps of each media flow of one frame, to keep synchronous initialization of each media flow in one frame.
Description
Technical field
The present invention relates to the time division stream media technology of digital broadcasting and communication field, particularly relate to a kind of processing method and device of realizing that the time division stream media code check is level and smooth.
Background technology
Below divide two parts to introduce the code check smoothing problasm of time division stream media and time division stream media respectively.
One, time division stream media
Regulation in People's Republic of China's radio, film and television industry standard " Mobile Multimedia Broadcasting part 2: multiplexing " adopts multiplexed sub frame to come stream medium datas such as encapsulate video, audio frequency to transmit.Multiplexed sub frame served as to transmit at interval with 1 second, and the Streaming Media of the subframe that is re-used encapsulation has just had the time-division characteristic, becomes time division stream media.
Multiplexed sub frame has such characteristics: Media Streams such as video, audio frequency adopt the timeline of unified benchmark, Media Stream in the same subframe, a shared zero-time, video unit, the audio unit timestamp that comes indexing unit with respect to the relative time of zero-time.
Two, the code check smoothing problasm of time division stream media
Because time division stream media transmits a frame (subframe) structure by certain time interval, if the same time interval by media timestamp comes encapsulated frame (subframe) structure, then because the characteristic of medium itself, cause code check unsmooth, for example, near key frame of video, code check can be bigger, near the non-key frame, code check can be smaller.And the physical channel that frame (subframe) structure transmits often requires code check to be limited within certain scope.The media data that transmits is done code check smoothly can utilize channel capacity best.
Existing code check smoothing technique usually all is specific at video code flow, and it is level and smooth that video code flow is done code check separately, transmits then, and the code stream of transmission is with the not strict timestamp of complying with Media Stream; Audio code stream is not then done smoothing processing, still presses media timestamp and transmits.
If directly this common mode is introduced subframe as regulation in " Mobile Multimedia Broadcasting part 2: multiplexing ", then can cause video, audio frequency in the same subframe, its timestamp differs bigger, gets Media Stream from subframe like this and does subsequent treatment as playing relatively difficulty such as the meeting of grade.This is because front end video flowing, audio stream often adopt is timestamp benchmark independently separately, output also is relatively independent, video, audio stream data on a time synchronized point, it is far away that its time of reception may differ, in this case, use the timestamp interval of the video code flow that rigidly connects receipts simply, reach the corresponding audio data, the situation that the audio stream data of needs is not also received just may appear, and in the Streaming Media environment, go to wait for that this interval voice data can cause a lot of reluctant situations.
Summary of the invention
The code rate smoothing method and the device that the purpose of this invention is to provide a kind of time division stream media, it is unsmooth to solve prior art Media Stream code check, and the timestamp interval of the video in same division frame, audio frequency differs bigger technical problem.
To achieve these goals, the invention provides a kind of code rate smoothing method of time division stream media, wherein, comprise the steps: step 1,, get once the current video flowing of receiving, and store in the buffer storage every predetermined time interval; Step 2, every predetermined time interval, the corresponding audio bit stream data is got in the timestamp interval of the video flowing of receiving according to the last time, and the video flowing that described audio code stream data and described last time receive is encapsulated in the same division frame.
Above-mentioned method, wherein, described buffer storage comprises first memory and second memory, the current video flowing of receiving is stored in the first memory, the video flowing that last time receives is stored in the second memory, switches described first memory and second memory after the video flowing that will once receive on described is encapsulated into division frame.
Above-mentioned method, wherein, in described step 2, described timestamp interval is T
Start-Δ T is to T
End+ Δ T, wherein T
Start, T
EndBe respectively the initial and end timestamp of the video flowing that the described last time receives, the surplus of Δ T for setting.
Above-mentioned method wherein, in described step 2, abandons early than T
StartThe audio code stream data of-Δ T.
Above-mentioned method, wherein, in described step 2, if described second memory is empty, explanation is to collect video flowing first, then directly carries out switching of described first memory and second memory.
Above-mentioned method wherein, before described step 1, also comprises: the Media Stream that receives is stamped the desired unified division frame timestamp of division frame by the time synchronized relation.
Above-mentioned method, wherein, described predetermined time interval is poor greater than the normal time of reception of video stream data on a time synchronized point and audio stream data.
Above-mentioned method, wherein, described predetermined time interval is the time interval T of division frame.
In order to realize purpose of the present invention, the present invention also provides a kind of code check smoothing apparatus of time division stream media, wherein, comprising: video flowing is collected module, buffer storage and division frame package module; Described video flowing is collected module and is used for: every predetermined time interval, get once the current video flowing of receiving, and store in the buffer storage; Described division frame package module is used for: every predetermined time interval, the timestamp interval of the video flowing of receiving according to the last time, get the corresponding audio bit stream data, and the video flowing that described audio code stream data and described last time receive is encapsulated in the same division frame.
Above-mentioned device, wherein, described buffer storage comprises first memory and second memory, the current video flowing of receiving is stored in the first memory, the video flowing that last time receives is stored in the second memory, and described first memory was switched mutually with second memory after the video flowing of once receiving on described was packaged into division frame.
Above-mentioned device wherein, also comprises the time stamp modular converter, is used for: the Media Stream that receives is stamped the desired unified division frame timestamp of division frame by the time synchronized relation.
Technique effect of the present invention is:
1) because the present invention collects the video data of receiving in the period T of this division frame (subframe), can guarantee the video data of encapsulation in the frame (subframe), comply with the video reception code check of level and smooth mistake; And because remove to collect voice data by the video time interval, can keep the timestamp interval of each Media Stream in same division frame (subframe) structure to differ very little, keep the initial synchronous of each Media Stream of same division frame (in the subframe), each video data of collecting with the last time can avoid occurring the situation that needed audio stream data is not also received as foundation among the present invention.
2) adopt the method for the invention, can well be integrated with existing code check smoothing technique, realize that the code check of time division stream media is level and smooth, to adapt to transfer channel better to the limited bit rate provisioning request.Use this method, can keep the timestamp interval of each Media Stream in same frame (subframe) structure to differ very little, keep the initial synchronous of each Media Stream of same frame (in the subframe), make things convenient for the subsequent treatment on frame (subframe) basis; Simultaneously, this method can be avoided because of waiting for that code stream that synchronous voice data causes is obstructed or losing situation such as data, keeps the quality of the Streaming Media that transmitted.
3) handle the frame (subframe) that export the back by the present invention, because on the level and smooth basis of code check, guarantee the initial synchronous of each Media Stream of same frame (in the subframe), subsequent treatment begins to handle from arbitrary frame (subframe), the video/audio data of the inside all are synchronous, can simplify the complexity of subsequent treatment like this, play the effect that improves treatment effeciency, reduces cost.
Description of drawings
Fig. 1 is a method flow diagram provided by the invention;
Fig. 2 is the structural representation of the correlation function piece of device provided by the invention;
Fig. 3 is the detailed process flow chart of the inventive method.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the accompanying drawings and the specific embodiments.
The present invention is under the time division stream media environment of regulation in " Mobile Multimedia Broadcasting part 2: multiplexing ", realize the level and smooth of Media Stream code check, keep the timestamp interval of each Media Stream in same frame (subframe) structure to differ very little simultaneously, keep the initial synchronous of each Media Stream of same frame (in the subframe).
Fig. 1 is a method flow diagram provided by the invention, and as figure, the present invention mainly may further comprise the steps:
Step 101 every predetermined time interval, is got once the current video flowing of receiving, and is stored in the buffer storage;
Step 102, every predetermined time interval, the corresponding audio bit stream data is got in the timestamp interval of the video flowing of receiving according to the last time, and the video flowing that described audio code stream data and described last time receive is encapsulated in the same division frame.
The functional block that the inventive method relates to is seen accompanying drawing 2.The inventive method is mainly implemented in " the division frame code check smoothing processing " 203 in accompanying drawing 2, so the inventive method also is applicable to the combination of this functional block and other functional part.
Each functional block specification is as follows among Fig. 2:
Stream input function piece 201 can adopt existing common technology, to video flowing do code check level and smooth after, the not strict media timestamp of press is exported; Audio stream is pressed media timestamp output.In the prior art, video flowing, audio stream often adopt is timestamp benchmark independently separately, and output also is relatively independent.
Time stamp translation function piece 202 mainly is the requirement according to division frame (subframe), with the different media flows that receives, by the time synchronized relation, stamps the desired unified time of frame (subframe) and stabs.For explaining conveniently, in the follow-up explanation, be referred to as the division frame timestamp.
Division frame code check smoothing function piece 203 is main function components of implementing this method, and it may further include video flowing and collects module, buffer storage and division frame package module.In this functional block, every the time interval T of division frame (subframe), get once the current video flowing of receiving, get its timestamp interval, reach the corresponding audio bit stream data according to this timestamp interval again, video, the audio frequency that takes out is encapsulated in the same division frame (subframe) goes.
The inventive method is avoided using the timestamp interval of the video code flow that rigidly connects receipts directly to reach the corresponding audio data simply, but has taked buffering.Fig. 3 is the detailed process flow chart of the inventive method, and detailed process flow process of the present invention is as follows:
In the methods of the invention, video, audio stream data on time synchronized point, its time of reception is poor, and under the normal condition, maximum is no more than certain threshold value, as the time interval T of division frame (subframe).
The inventive method is got two buffering area BUF1 and BUF2 in advance, and comprises:
Every period T, above-mentioned handling process circulates afterwards.
Wherein, also can further comprise in the step 304: the last video data of collecting from BUF2, get its initial and end time stamp T
Start, T
EndBe benchmark, stay a bit up and down surplus Δ T after, obtain the interval T of timestamp
Start-Δ T is to T
End+ Δ T;
Then can further comprise in the step 305: use T
Start-Δ T and T
End+ Δ T removes to collect voice data in this interval as the timestamp interval, early than T
StartThe audio frequency of-Δ T abandons;
Then can further comprise in the step 306:, be encapsulated in the frame (subframe structure) according to frame (subframe) form and go video, the audio frequency media data of collecting;
Then can further comprise in the step 306: replace BUF2 with BUF1, the video data conduct of this collection soon is the video media-data of encapsulated frame (subframe) next time.
Because the present invention collects the video data of receiving in the period T of this division frame (subframe), can guarantee the video data of encapsulation in the frame (subframe), complys with the video reception code check of level and smooth mistake; And because remove to collect voice data by the video time interval, can keep the timestamp interval of each Media Stream in same division frame (subframe) structure to differ very little, keep the initial synchronous of each Media Stream of same division frame (in the subframe), each video data of collecting with the last time can avoid occurring the situation that needed audio stream data is not also received as foundation among the present invention.
Adopt the method for the invention, can well be integrated with existing code check smoothing technique, realize that the code check of time division stream media is level and smooth, to adapt to transfer channel better to the limited bit rate provisioning request.Use this method, can keep the timestamp interval of each Media Stream in same frame (subframe) structure to differ very little, keep the initial synchronous of each Media Stream of same frame (in the subframe), make things convenient for the subsequent treatment on frame (subframe) basis; Simultaneously, this method can be avoided because of waiting for that code stream that synchronous voice data causes is obstructed or losing situation such as data, keeps the quality of the Streaming Media that transmitted.
Handle the frame (subframe) of back output by the present invention, because on the level and smooth basis of code check, guarantee the initial synchronous of each Media Stream of same frame (in the subframe), subsequent treatment begins to handle from arbitrary frame (subframe), the video/audio data of the inside all are synchronous, can simplify the complexity of subsequent treatment like this, play the effect that improves treatment effeciency, reduces cost.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (11)
1. the code rate smoothing method of a time division stream media is characterized in that, comprises the steps:
Step 1 every predetermined time interval, is got once the current video flowing of receiving, and is stored in the buffer storage;
Step 2, every predetermined time interval, the corresponding audio bit stream data is got in the timestamp interval of the video flowing of receiving according to the last time, and the video flowing that described audio code stream data and described last time receive is encapsulated in the same division frame.
2. method according to claim 1, it is characterized in that, described buffer storage comprises first memory and second memory, the current video flowing of receiving is stored in the first memory, the video flowing that last time receives is stored in the second memory, switches described first memory and second memory after the video flowing that will once receive on described is encapsulated into division frame.
3. method according to claim 2 is characterized in that, in described step 2, described timestamp interval is T
Start-Δ T is to T
End+ Δ T, wherein T
Start, T
EndBe respectively the initial and end timestamp of the video flowing that the described last time receives, the surplus of Δ T for setting.
4. method according to claim 3 is characterized in that, in described step 2, abandons early than T
StartThe audio code stream data of-Δ T.
5. method according to claim 2 is characterized in that, in described step 2, if described second memory is empty, explanation is to collect video flowing first, then directly carries out switching of described first memory and second memory.
6. according to claim 1,2,3,4 or 5 described methods, it is characterized in that, before described step 1, also comprise: the Media Stream that receives is stamped the desired unified division frame timestamp of division frame by the time synchronized relation.
7. method according to claim 6 is characterized in that, described predetermined time interval is poor greater than the normal time of reception of video stream data on a time synchronized point and audio stream data.
8. method according to claim 7 is characterized in that, described predetermined time interval is the time interval T of division frame.
9. the code check smoothing apparatus of a time division stream media is characterized in that, comprising: video flowing is collected module, buffer storage and division frame package module;
Described video flowing is collected module and is used for: every predetermined time interval, get once the current video flowing of receiving, and store in the buffer storage;
Described division frame package module is used for: every predetermined time interval, the timestamp interval of the video flowing of receiving according to the last time, get the corresponding audio bit stream data, and the video flowing that described audio code stream data and described last time receive is encapsulated in the same division frame.
10. device according to claim 9, it is characterized in that, described buffer storage comprises first memory and second memory, the current video flowing of receiving is stored in the first memory, the video flowing that last time receives is stored in the second memory, and described first memory was switched mutually with second memory after the video flowing of once receiving on described was packaged into division frame.
11. device according to claim 9 is characterized in that, also comprises the time stamp modular converter, is used for: the Media Stream that receives is stamped the desired unified division frame timestamp of division frame by the time synchronized relation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200710099522A CN100589578C (en) | 2007-05-23 | 2007-05-23 | A kind of code rate smoothing method of time division stream media and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200710099522A CN100589578C (en) | 2007-05-23 | 2007-05-23 | A kind of code rate smoothing method of time division stream media and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101312534A true CN101312534A (en) | 2008-11-26 |
CN100589578C CN100589578C (en) | 2010-02-10 |
Family
ID=40100928
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200710099522A Expired - Fee Related CN100589578C (en) | 2007-05-23 | 2007-05-23 | A kind of code rate smoothing method of time division stream media and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100589578C (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101984667A (en) * | 2010-11-19 | 2011-03-09 | 北京数码视讯科技股份有限公司 | Code rate control method and code rate controller |
CN101996662A (en) * | 2010-10-22 | 2011-03-30 | 深圳市万兴软件有限公司 | Method and device for connecting and outputting video files |
-
2007
- 2007-05-23 CN CN200710099522A patent/CN100589578C/en not_active Expired - Fee Related
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101996662A (en) * | 2010-10-22 | 2011-03-30 | 深圳市万兴软件有限公司 | Method and device for connecting and outputting video files |
CN101996662B (en) * | 2010-10-22 | 2012-08-08 | 深圳市万兴软件有限公司 | Method and device for connecting and outputting video files |
CN101984667A (en) * | 2010-11-19 | 2011-03-09 | 北京数码视讯科技股份有限公司 | Code rate control method and code rate controller |
CN101984667B (en) * | 2010-11-19 | 2012-05-30 | 北京数码视讯科技股份有限公司 | Code rate control method and code rate controller |
Also Published As
Publication number | Publication date |
---|---|
CN100589578C (en) | 2010-02-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2003207435B2 (en) | Clock-based time slicing | |
CN101282482B (en) | Apparatus, system and method for synchronously playing video data and audio data | |
RU2325781C2 (en) | Method of signal transmission with time slotting parameters in service information | |
CN101312530B (en) | Method and apparatus for smoothing transmission code rate of time division stream media | |
CN101159751B (en) | Method and device of transmitting time division multiplex service through IP switch network | |
WO2008027841A3 (en) | Digital video content customization | |
MXPA04007663A (en) | Time-slice signaling for broadband digital broadcasting. | |
CN101889451A (en) | Systems and methods of reducing media stream delay through independent decoder clocks | |
CN100589572C (en) | A kind of terminal and quick preview mobile TV channel method thereof | |
JP2008160370A (en) | Data transmission system and method, data transmission device, and data reception device | |
CN100589578C (en) | A kind of code rate smoothing method of time division stream media and device | |
CN100481958C (en) | System and method for performing signal synchronization of data streams | |
CN101646075A (en) | Device and method for adjusting code rate of multimedia code stream | |
CN101175095A (en) | Family network multimedia access apparatus and method | |
CA2359731A1 (en) | Method and apparatus for delivering reference signal information within a specified time interval | |
CN101321293B (en) | Apparatus and method for implementing multi-path program multiplexing | |
CN113141520B (en) | Video stream transmission method and device, electronic equipment and storage medium | |
WO2017118019A1 (en) | E1 structured time-slot compression mode packet transport method and apparatus | |
CN101267572B (en) | A program stream conversion method and device | |
CN101453286B (en) | Method for digital audio multiplex transmission in multimedia broadcasting system | |
CN100561931C (en) | Adopt elongated frame to improve the mobile multimedia broadcast system and the method thereof of transmission efficiency | |
CN101635668A (en) | Method and system for transmitting and controlling ethernet data | |
CN101478360A (en) | Multi-service multiplexing method and apparatus in mobile multimedia broadcast system | |
CN101102510A (en) | Audio and video synchronization method for portable image terminal | |
CN113556619B (en) | Device and method for link transmission and method for link reception |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100210 Termination date: 20190523 |
|
CF01 | Termination of patent right due to non-payment of annual fee |