CN102572521B - Method and system for automatically distributing code rate of basic video code stream of transmission stream - Google Patents
Method and system for automatically distributing code rate of basic video code stream of transmission stream Download PDFInfo
- Publication number
- CN102572521B CN102572521B CN201210016883.6A CN201210016883A CN102572521B CN 102572521 B CN102572521 B CN 102572521B CN 201210016883 A CN201210016883 A CN 201210016883A CN 102572521 B CN102572521 B CN 102572521B
- Authority
- CN
- China
- Prior art keywords
- video
- code check
- program
- code
- audio
- 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.)
- Expired - Fee Related
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000005516 engineering process Methods 0.000 claims description 8
- 239000002699 waste material Substances 0.000 abstract description 5
- 230000033228 biological regulation Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000001360 synchronised effect Effects 0.000 description 4
- 238000000205 computational method Methods 0.000 description 3
- 230000001186 cumulative effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention discloses a method for automatically distributing a code rate of a basic video code stream of a transmission stream (TS). According to the method, the video code rate is automatically distributed according to configuration information of a sending end, so that use and configuration processes of the sending end are simplified; and therefore, on the premise of guaranteeing the normal work of a digital television system, the waste of bandwidth is reduced, and the image quality is improved. The method is applied to the sending end of a digital television, so that a receiving end of the digital television can normally receive and decode video streams without other configurations. The invention also discloses a system for automatically distributing the code rate of the basic video code stream of the transmission stream, an encoding method and an encoder. The video code rate can be distributed precisely according to a channel bandwidth and a multiplexing parameter; and under the condition of guaranteeing the normal work of the whole system, the channel bandwidth can be used to the maximum extent, the TS empty package rate is reduced, and the video image quality is improved. The method and system, encoding method and encoder disclosed by the invention can be suitable for various multiplexing, audio and video encoding standards.
Description
Technical field
The present invention relates to Video coding, the multiplexing and encoding technology of Digital Television, is a kind of method and system of automatic distribution transport stream video elementary code stream code check specifically.
Background technology
At digital TV field, a programs at least should comprise video He Yi road, a road audio frequency, and video, voice data are produced by separate video encoder, audio coder, and they all can not directly transfer to decoding end.Multiplexer is packaged into single data flow by separate video, voice data according to specified format, and inserts necessary descriptor in this data flow, guarantee decoding end can zero defect ground, the decoding of labial synchronization ground obtains video, voice data.Generally speaking, the broadcast end of Digital Television is completed the coding of a road program by 3 formants such as video encoder, audio coder and multiplexer, receiving terminal completes coding by 3 of demodulation multiplexer, Video Decoder, audio decoders etc. with the formant of coding contrary, thereby realizes a set of complete reliable digital tv encoder, transmission, decode procedure.
For the most frequently used MPEG Digital Television coding/decoding system, multiplexing and demultiplexing is by the universal coding part 1 of standard GB/T17975.1-2000 < < information technology moving image and sound information thereof: system > > regulation, coding and decoding video is by the universal coding part 2 of standard GB/T 17975.2-2000 < < information technology moving image and sound information thereof: video > > regulation, audio coding decoding is by universal coding the 3rd part of standard GB/T 17975.3-2002 < < information technology moving image and sound information thereof: audio frequency > > regulation.
Fig. 1 is existing typical operation flow graph, take common single-definition digital television as example, audio input signal is pulse code modulation (PCM) data of dual track, sample rate 48kHz, after audio coder compressed encoding, obtaining bit rate output is the audio frequency elementary stream (ES) of 256Kbps, conventionally adopts MP2 form to encode; Video input signals is 4:2:0 component vide (YUV) data of resolution 720x576, frame per second 25fps, after video encoder compressed encoding, obtain the video elementary code stream that bit rate output is 5Mbps (ES), conventionally adopt MPEG-2 form to encode.Video ES, audio ES are encoded to unified transport stream (TS) by multiplexer, TS code check should be greater than video, audio code rate sum and export to stablize code check, for the audio ES of video ES, the 256Kbps of 5Mbps, be conventionally encoded to the TS of 6Mbps or higher code check, residue 744Kbps or be more used for transmitting the descriptor of TS and maintain the empty bag of the stable filling of TS code check.
Multiplexer receiver, video ES and audio ES, video and audio ES form is not identical and every frame length is unfixing.For the separate video and audio ES of unified transmission, first need to be changed into the packetized elementary stream that relative multiplexer is identical (PES), and adding corresponding PES header packet information and time mark, multiplexer is further decomposed into video and audio PES the shorter and fixing TS bag of length again.TS bag is the elementary cell of TS, and length is fixed as K (K is 188 bytes or 204 bytes), need fill hash to meet the integral multiple of K byte when PES packet length is not the integral multiple of TS packet length.Each TS bag all carries the descriptors such as synchronous head and program identification code (PID), and all TS bags of same ES all have identical PID, thereby assurance receiving terminal selects required ES to repel other ES according to PID simultaneously.
In order to guarantee the normal work of whole video/audio encoding and decoding system, in TS, except audio, video data, also must comprise Program Association Table (PAT), Program Map Table (PMT), the universal coding part 1 that also comprises alternatively GB/T 17975.1-2000 < < information technology moving image and sound information thereof: one or more program specific informations that system > > supports, program specific informations (PSI) such as CAT Conditional Access Table (CAT), program description list (SDT).When the total valid data code check that comprises video/audio and PSI is less than TS code check, insert the empty bag of filling stable to maintain TS code check.
At receiving terminal, the process of execution and transmitting terminal contrary, demodulation multiplexer wraps and completes TS stream according to PID identification TS and resolves.First remove and fill empty bag, resolve again the descriptors such as PAT, PMT, CAT and SDT and obtain logical construction and the video and audio PID of TS, according to video and audio PID, resolve video/audio again, export frame by frame video-audio decoder to, decoder completes the TV programme that ES decoding obtains zero defect.
In actual digital television broadcasting system, transmitting terminal is commonly referred to encoder, it comprises audio coder, video encoder and multiplexer, and an encoder device should at least can complete the coding of 1 programs, wherein at least should comprise 1 road video, 1 road audio frequency and export legal TS; Receiving terminal is called decoder, and it comprises demodulation multiplexer, audio decoder, Video Decoder.
The channel width of actual digital TV broadcasting network is fixed, realizing stabilization signal transmission just requires TS code check stable, first require the stable and code check sum of the bit rate output of video encoding device of transmitting terminal to be less than TS total bitrate, to there are enough bandwidth to send PSI information; The code check of audio ES is lower and stable, and video ES accounts for major part and the code check Possible waves of TS, and the setting of video ES code check is to determine that can TS to stablize the key of code check output.Video ES code check arranges too high meeting and causes sending buffer overflow and cause the abnormal conditions such as frame losing, reception mistake; Although video ES code check arranges too low multiplexer, can guarantee that whole system is working properly by filling empty bag, can not make full use of bandwidth resources, reduce video image quality.
In existing technical scheme, for guaranteeing the lower video code rate of the normal selection conventionally of system works, allow certain bandwidth waste, the analysis of real figure TV signal is shown to the sky bag rate of TS is generally 20% left and right.Video code rate arranges the redundancy of conventionally removing audio code rate and the normal work of certain assurance system with TS code check, remaining bandwidth is as video code rate, if the undesired video that further reduces again of system works is found in test, do not have video code rate distribution method accurately, be inconvenient to use and waste bandwidth resource.The TS code check of take is example as 6000Kbps, audio code rate as 256Kbps, and video code rate is set to 5000Kbps or 4500Kbps conventionally.
Summary of the invention
The object of the invention is to propose a kind of method and system of automatic distribution transport stream video elementary code stream code check, according to the configuration information of transmitting terminal, automatically distribute video code rate, simplify use and the layoutprocedure of transmitting terminal, guaranteeing the waste of the normal prerequisite decline of operation low bandwidth, improve picture quality.
According to the present invention, a kind of method of automatic distribution transport stream video elementary code stream code check is provided, the method comprises:
According to application demand configuration transport stream total bitrate B
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs;
Obtain Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT;
Obtain Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT;
According to the transmission cycle of the quantity of optional program specific information, each optional program specific information, obtain the code check B of optional program specific information
pSI;
According to the coding standard of the audio frequency way of described each programs, each road audio frequency, audio sample rate, audio frequency elementary stream code check, obtain audio code rate B
audio;
According to the video frame rate of described program tricks, each programs, obtain video and fill code check B
fill;
According to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
audio, video fills code check B
fillobtain video code rate B
video;
According to described video code rate, obtain video elementary code stream code check E
video;
According to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
Preferably, described optional program specific information is for empty or by the universal coding part 1 of GB/T 17975.1-2000 < < information technology moving image and sound information thereof: one or more program specific informations that system > > supports.
Preferably, described Program Association Table code check B
pATcomputing formula be:
Wherein,
N
pATrepresent for representing the TS bag number of Program Association Table;
T
pATin the TS bag transmission cycle that represents Program Association Table, unit is millisecond;
K represents the byte number of each TS bag.
Preferably, when program tricks is less than 42, N
pAT=1.
Preferably, described Program Map Table code check B
pMTcomputing formula be:
Wherein,
M represents program tricks;
in the TS bag transmission cycle that represents the Program Map Table of each programs, unit is millisecond;
K represents the byte number of each TS bag.
Preferably, the code check B of described optional program specific information
pSIcomputing formula be:
Wherein,
S represents the quantity of optional program specific information;
in the transmission cycle that represents the TS bag of each optional program specific information, unit is millisecond;
K represents the byte number of each TS bag.
Preferably, described audio code rate B
audiofor the audio code rate sum of each programs, the audio code rate B ' of each programs
audiocomputing formula be:
Wherein,
A represents the audio frequency way of each programs;
L
ithe length that represents the every frame audio frequency elementary stream of each road audio frequency under selected audio Basic Flow code check;
H
ithe audio sample rate that represents each road audio frequency;
C
irepresent that each road audio frequency is in the PCM sampled point number of the substandard every frame audio frequency of selected audio;
K represents the byte number of each TS bag.
Preferably, described video is filled code check B
fillcomputing formula be:
Wherein,
M represents program tricks;
F
ithe video frame rate that represents each programs;
K represents the byte number of each TS bag.
Preferably, described video code rate B
videocomputing formula be:
B
cideo=B
TS-B
PAT-B
PMT-B
PSI-B
audio-B
fill
Preferably, described video elementary code stream code check E
videocomputing formula be:
Wherein,
184 represent the maximum load byte number of each TS bag;
K represents the byte number of each TS bag.
According to another aspect of the present invention, a kind of system of automatic distribution transport stream video elementary code stream code check, this system comprises:
Dispensing unit, for configuring transport stream total bitrate B according to application demand
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs;
Program Association Table code check acquiring unit, for obtaining Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT;
Program Map Table code check acquiring unit, for obtaining Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT;
Optional program specific information code check acquiring unit, for obtaining the code check B of optional program specific information according to the transmission cycle of the quantity of optional program specific information, each optional program specific information
pSI;
Audio code rate acquiring unit, for obtaining audio code rate B according to the coding standard of the audio frequency way of described each programs, each road audio frequency, audio sample rate, audio frequency elementary stream code check
audio;
Video is filled code check acquiring unit, for obtain video according to the video frame rate of described program tricks, each programs, fills code check B
fill;
Video code rate acquiring unit, for according to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
audio, video fills code check B
fillobtain video code rate B
video;
Video elementary code stream code check acquiring unit, for obtaining video elementary code stream code check E according to described video code rate
video;
Video elementary code stream Data Rate Distribution unit, for according to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
According to a third aspect of the present invention, provide a kind of coding method of automatic distribution transport stream video elementary code stream code check, the method comprises,
Automatically for encoder distributes video elementary code stream code check;
According to described video elementary code stream code check, encode.
According to a fourth aspect of the present invention, provide a kind of encoder of automatic distribution transport stream video elementary code stream code check, this encoder comprises,
Video elementary code stream Data Rate Distribution unit, for being automatically encoder distribution video elementary code stream code check;
Coding unit, for encoding according to described video elementary code stream code check.
The present invention acts on the transmitting terminal of Digital Television, configures, normally receipt decoding at receiving terminal without other.Automatic distribution video code rate method proposed by the invention can be distributed video code rate exactly according to channel width and multiplexing parameters, guaranteeing under whole system reference performance, maximally utilise channel width, reduce the empty bag rate of TS, improve video image quality, applicable various multiplexing, the audio frequency of the present invention, video encoding standard.
Accompanying drawing explanation
Fig. 1 illustrates operation flow chart.
Fig. 2 illustrates according to the method flow diagram of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
Fig. 3 illustrates according to the block diagram of the system of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
Fig. 4 illustrates according to the coding method flow chart of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
Fig. 5 illustrates according to the structured flowchart of the encoder of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention is further elaborated.
Fig. 2 illustrates according to the method flow diagram of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
In step S11, according to application demand configuration transport stream total bitrate B
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs.Particularly, at transmitting terminal, above-mentioned a series of configuration items except video elementary code stream code check are configured, wherein, B
tSrepresent transport stream (TS) the data total amount sending in 1 second.
In step S12, obtain Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT.
Particularly, Program Association Table code check B
pATcomputing formula be:
Wherein, N
pATrepresent for representing the TS bag number of Program Association Table; T
pATin the TS bag transmission cycle that represents Program Association Table, unit is millisecond; K represents the byte number of each TS bag, is generally 188 bytes or 204 bytes.
According to the embodiment of the present invention, each represents that the TS bag of Program Association Table can represent nearly 42 programs, therefore, when program tricks is less than 42, N
pAT=1, N in the situation that program tricks is greater than 42 only
pATmay be greater than 1.
In step S13, obtain Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT.
Particularly, B
pMTdetermined by the program tricks of TS, the PMT transmission cycle of each program, the PMT of program tricks and each program sends the cycle and is configured by transmitting terminal.Suppose that program tricks is M, each program PMT is by N
pMTindividual TS wraps to represent, each program PMT transmission cycle is T
pMTmillisecond:
Each represents that the TS bag of PMT can represent to surpass the Audio and Video stream on 30 tunnels, the N in the situation that video-voice frequency flow being a lot of in every programs
pMTmay be greater than 1.N in actual applications
pMT1 the situation of being greater than there will not be substantially.
In step S14, according to the transmission cycle of the quantity of optional program specific information, each optional program specific information, obtain the code check B of optional program specific information
pSI.
Particularly, B
pSIby the number of optional program specific information of transport stream (TS), the transmission cycle of each optional program specific information determine, optional program specific information and transmission cycle thereof are configured by transmitting terminal.Suppose that optional program specific information number is S, each program specific information is by N
pSIindividual TS wraps to represent, each PSI transmission cycle is T
pSImillisecond:
In step S15, according to the coding standard of the audio frequency way of described each programs, each road audio frequency, audio sample rate, audio frequency elementary stream code check, obtain audio code rate B
audio.
Particularly, audio code rate B
audiofor the audio code rate sum of each programs, the audio code rate B ' of each programs
audiocoding standard, audio sample rate, audio frequency Basic Flow code check E by audio frequency way and each road audio frequency
audioetc. coded system, determine.Each frame audio frequency is by an independently integer TS bag transmission, B
audiowith audio frequency elementary stream code check E
audiodifference, audio coding standard, audio sample rate and audio frequency elementary stream code check E
audioby transmitting terminal, configure.The audio frequency way of supposing each programs is A, and every frame audio frequency of each road audio frequency selected audio standard is C PCM sampled point, and under selected audio code check, every frame audio ES length is L, and audio sample rate is H:
While comprising multiple programs in output transport stream, the audio code rate of each programs calculates by same procedure, and the audio code rate of cumulative each programs obtains final audio code rate B
audio.
In step S16, according to the video frame rate of described program tricks, each programs, obtain video and fill code check B
fill.
Particularly, B
fillvideo frame rate by program tricks and each programs determines.Each frame video, by an independently integer TS bag transmission, because the length of each frame video elementary code stream (ES) is fixing, when video packetized elementary stream (PES) length is not the integral multiple of K, need be filled to K byte while sending last TS bag.Filling bag, from different for the empty bag of the stable filling of TS code check, still contains video data in filling bag, need resolved; Filling empty bag is useless all over, at receiving terminal, can directly abandon.
Each frame video elementary code stream (ES) length is random, can think that the video data byte number in last TS bag of each frame packetized elementary stream (PES) is [0, K] between be evenly distributed, namely the video padding data of each frame is being evenly distributed between [0, K].Video frame rate configures at transmitting terminal, supposes that video frame rate is F:
While comprising multiple programs in output transport stream, the video of each programs is pressed same procedure and is calculated video filling code check, and the video of the video of cumulative each programs filling code check obtains final video filling code check B
fill.
In step S17, according to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
udio, video fills code check B
fillobtain video code rate B
video.
Particularly, B
video=B
tS-B
pAT-B
pMT-B
pSI-B
audio-B
fill.
In step S18, according to described video code rate, obtain video elementary code stream code check E
video.
Particularly, TS packet length is K byte, the fixing information such as synchronous head, PID that represent of front K ' byte, and the maximum load of TS bag is K-K ' byte, that is:
In the present embodiment, when TS packet length is 188 bytes, the fixing information such as synchronous head, PID that represent of front 4 bytes, the maximum load of TS bag is 184 bytes, that is:
When TS packet length is 204 bytes, the fixing information such as synchronous head, PID that represent of front 4 bytes, rear 16 bytes are fixed as forward error correction (FEC), and the maximum load of TS bag is still 184 bytes, that is:
E
videobeing the present invention is the video code rate that video encoder distributes automatically.
In step S19, according to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
Particularly, in video encoding and multiplex system, by B
tSthe bit rate output of configure multiplexer, press E
videoconfiguration audio coder bit rate output, press E
videothe bit rate output of configuration video encoder.
It should be noted that B
pAT, B
pMT, B
pSI, B
audio, B
filldeng the code check before video code rate, calculate and can carry out in any order, random order is all within protection scope of the present invention.
It should be noted that, optional program specific information not only comprises CAT Conditional Access Table and program description list, also comprise the network information table (NIT) supported by standard GB/T 17975.1-2000, Event Information Table (EIT), time/date table (TDT), BAT bouquet association table (BAT), Running Status Table (RST), TOT Time Offset Table (TOT) etc., its code check computational methods are all identical with the computational methods of optional program specific information.
Specifically lifting two examples is below elaborated further above-mentioned steps again.
Example 1
The existing typical digital tv encoder mode of take is example, specification requirement according to General Bureau of Radio, Film and Television about < < single-definition digital television encoder, decoder technique requirement and method of measurement > >, Video coding adopts GB/T17975 principal mode main, audio coding to adopt GB/T to encode for 17191 layer 2, Program Association Table (PAT) recurrence interval is less than 500 milliseconds, and Program Map Table (PMT) recurrence interval is less than 500ms.Suppose that current encoder setting only carries out the coding of 1 programs, only comprise 1 road audio frequency, 1 road video in this program, TS packet length K is 188 bytes, and the concrete steps that technical scheme according to the present invention is distributed automatically to video code rate are as follows:
The first step: encoder configuration output transport stream (TS) total bitrate B
tSfor 6000Kbps; Transport stream comprises that 1 programs, Program Association Table transmission cycle are 200ms, Program Map Table transmission cycle is that 200ms, transport stream packets are containing CAT Conditional Access Table (CAT) and program description list (SDT) information, CAT Conditional Access Table (CAT) and program description list (SDT) transmission cycle are only has 1 road audio frequency in 2000ms, transport stream, adopt 17191 layer of 2 coded format of GB/T, sample rate is 48KHz, and coding bit rate is that 256Kbps, video frame rate are 25fps.
Second step: TS is that 1 programs, PAT transmission cycle are 200ms due to encoder configuration output, each needs to send 1 TS bag that represents PAT, therefore, Program Association Table code check B
pATfor:
The 3rd step: TS is that 1 programs, PMT transmission cycle are 200ms due to encoder configuration output, therefore, Program Map Table code check B
pMTfor:
The 4th step: TS comprises CAT and SDT information due to encoder configuration output, and the transmission cycle is 2000ms, therefore, therefore, the code check B of optional program specific information
pSIfor:
The 5th step: owing to only having 1 road audio frequency in encoder configuration output TS, adopt 17191 layer of 2 coded format of GB/T, sample rate is 48KHz, and coding bit rate is 256Kbps; According to GB/T 17191 coding standards, every frame audio frequency length is 1152 sampled points, and each frame ES length is fixed, and the maximum load of each TS bag is 184 bytes, and each frame audio frequency need be encoded to an integer TS bag and send.
According to the standard regulation of 17191 layer 2 of GB/T, 1 frame audio ES length L is:
L=144×256000/48000
The maximum load of wrapping due to each TS is 184 bytes, and each frame audio frequency all need to be wrapped and be represented by an integer TS:
B while comprising multichannel voice frequency in TS
audioshi Ge road audio frequency actual bit rate sum; When using other audio format, by respective standard regulation, with similarity method, calculate B
audio; Here also can find out B
audiowith E
audiodifferent.
The 6th step: because video frame rate is 25fps, therefore,
When video frame rate is different, B
fillcomputational methods identical.
The 7th step: obtain video code rate B
videofor:
B
video=B
TS-B
PAT-B
PMT-B
PSI-B
audio-B
fill
=6000000-7520-7520-1504-313333-18800
=5651323
The 8th step: obtain video elementary code stream code check E
videofor:
The 9th step, according to E
videobit rate output for 5531Kbps configuration video encoder.
For this example, prior art scheme conventionally video ES code check is set to 5000Kbps, compare with prior art scheme, the present invention can distribute video ES code check accurately automatically, make video bandwidth improve 532Kbps, simplified the setting up procedure of video code rate, avoid bandwidth waste, improve channel utilization, improve video image quality.
Example 2
Suppose that current encoder setting carries out the coding of 2 programs, comprise 1 road audio frequency, 1 road video in the 1st programs, comprise 2 road audio frequency, 1 road video in the 2nd programs, the concrete steps that technical scheme according to the present invention is distributed automatically to video code rate are as follows:
The first step: encoder configuration output transport stream (TS) total bitrate B
tSfor 6000Kbps; Transport stream comprises that 2 programs, Program Association Table (PAT) transmission cycle are Program Map Table (PMT) transmission cycle of 200ms, the 1st programs is that Program Map Table (PMT) transmission cycle of 200ms, the 2nd programs is that 400ms, transport stream packets are containing CAT Conditional Access Table (CAT) and program description list (SDT) information, CAT Conditional Access Table (CAT) and program description list (SDT) transmission cycle are 2000ms, the 1st programs only has 1 road audio frequency, the 2nd programs to contain 2 road audio frequency, all adopt the video frame rate of 17191 layer of 2 coded format of GB/T, every programs to be 25fps.
Second step: TS is that 2 programs, PAT transmission cycle are 200ms due to encoder configuration output, each needs to send 1 TS bag that represents PAT, therefore, Program Association Table code check B
pATfor:
The 3rd step: TS is 2 programs due to encoder configuration output, and the PMT transmission cycle of the 1st programs is 200ms, and the PMT transmission cycle of the 2nd programs is 400ms, therefore, Program Map Table code check B
pMTfor;
The 4th step: TS comprises CAT and SDT information due to encoder configuration output, and the transmission cycle is 2000ms; Therefore, the code check B of optional program specific information
pSIfor:
The 5th step: encoder configuration output TS sound intermediate frequency all adopts 17191 layer of 2 coded format of GB/T, and sample rate is 48KHz.
The 1st programs only has 1 road audio frequency, and code check is 256Kbps:
The 2nd programs contains 2 road audio frequency, and code check is respectively 128Kbps and 256Kbps:
Total audio code check is:
B
audio=313333+501333=814666
The 6th step: the video frame rate that configures 2 programs due to encoder is 25fps, therefore, video is filled code check B
fillfor:
The 7th step: obtain video code rate B
videofor:
B
video=B
TS-B
PAT-B
PMT-B
PSI-B
audio-B
fill
=6000000-7520-11280-1504-814666-37600
=5127430
The 8th step: obtain video elementary code stream code check E
videofor:
The 9th step, according to E
videobit rate output for 5018Kbps configuration video encoder.
For multiple programs or multichannel voice frequency situation, the video ES code check setting of prior art scheme is more uncertain, and the present invention still can distribute video ES code check accurately automatically.It should be noted that the present invention is only on the whole for two-path video distributes code check, the concrete code check of two-path video can the whole code check of mean allocation, or the mode such as employing statistic multiplexing, and this patent is not done specific requirement.
Fig. 3 illustrates according to the block diagram of the system of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.
As shown in Figure 3, this system comprises: dispensing unit, and for configure transport stream total bitrate B according to application demand
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs; Program Association Table code check acquiring unit, for obtaining Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT; Program Map Table code check acquiring unit, for obtaining Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT; Optional program specific information code check acquiring unit, for obtaining the code check B of optional program specific information according to the transmission cycle of the quantity of optional program specific information, each optional program specific information
pSI; Audio code rate acquiring unit, for obtaining audio code rate B according to the coding standard of the audio frequency way of described each programs, audio sample rate, each road audio frequency, audio frequency elementary stream code check
audio; Video is filled code check acquiring unit, for obtaining video according to the video frame rate of described program tricks and each programs, fills code check B
fill; Video code rate acquiring unit, for according to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
audio, video fills code check B
fillobtain video code rate B
video; Video elementary code stream code check acquiring unit, for obtaining video elementary code stream rate E according to described video code rate
video; Video elementary code stream Data Rate Distribution unit, for according to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
Fig. 4 illustrates according to the coding method flow chart of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.As shown in Figure 4, first automatically for encoder distributes video elementary code stream code check; Then according to described video elementary code stream code check, encode.
Fig. 5 illustrates according to the structured flowchart of the encoder of the automatic distribution transport stream video elementary code stream code check of the embodiment of the present invention.As shown in Figure 5, this encoder comprises video elementary code stream Data Rate Distribution unit, for being automatically encoder distribution video elementary code stream code check; Coding unit, for encoding according to described video elementary code stream code check.
The present invention acts on the transmitting terminal of Digital Television, configures, normally receipt decoding at receiving terminal without other.Automatic distribution video code rate method proposed by the invention can be distributed video code rate exactly according to channel width and multiplexing parameters, guaranteeing under whole system reference performance, maximally utilise channel width, reduce the empty bag rate of TS, improve video image quality, applicable various multiplexing, the audio frequency of the present invention, video encoding standard.
Should be appreciated that and by the preferred embodiments of the present invention, technical scheme of the present invention is had been described in detail above.Those of ordinary skill in the art modifies reading the technical scheme that can record embodiment on the basis of specification of the present invention, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.Protection scope of the present invention is only limited by the claims of enclosing.
Claims (11)
1. automatically distribute a method for transport stream video elementary code stream code check, it is characterized in that, the method comprises: according to application demand configuration transport stream total bitrate B
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs;
Obtain Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT;
Obtain Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT;
According to the transmission cycle of the quantity of optional program specific information, each optional program specific information, obtain the code check B of optional program specific information
pSI;
According to the coding standard of the audio frequency way of described each programs, each road audio frequency, audio sample rate, audio frequency elementary stream code check, obtain audio code rate B
audio;
According to the video frame rate of described program tricks, each programs, obtain video and fill code check B
fill;
According to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
audio, video fills code check B
fillobtain video code rate B
video; According to described video code rate, obtain video elementary code stream code check E
video;
According to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
2. method according to claim 1, it is characterized in that, described optional program specific information is for empty or by the universal coding part 1 of GB/T17975.1-2000 < < information technology moving image and sound information thereof: one or more program specific informations that system > > supports.
3. method according to claim 1, is characterized in that, described Program Association Table code check B
pATcomputing formula be:
Wherein,
N
pATrepresent for representing the TS bag number of Program Association Table;
T
pATin the TS bag transmission cycle that represents Program Association Table, unit is millisecond;
K represents the byte number of each TS bag.
4. method according to claim 3, is characterized in that, when program tricks is less than 42, and N
pAT=1.
5. method according to claim 1, is characterized in that, described Program Map Table code check B
pMTcomputing formula be:
Wherein,
M represents program tricks;
represent for representing the TS bag number of the Program Map Table of each programs;
in the TS bag transmission cycle that represents the Program Map Table of each programs, unit is millisecond;
K represents the byte number of each TS bag.
6. method according to claim 1, is characterized in that, the code check B of described optional program specific information
pSIcomputing formula be:
Wherein,
S represents the quantity of optional program specific information;
in the transmission cycle that represents the TS bag of each optional program specific information, unit is millisecond;
K represents the byte number of each TS bag.
7. method according to claim 1, is characterized in that, described audio code rate B
audiofor the audio code rate sum of each programs, the audio code rate B' of each programs
audiocomputing formula be:
A represents the audio frequency way of each programs;
L
ithe length that represents the every frame audio frequency elementary stream of each road audio frequency under selected audio Basic Flow code check;
H
ithe audio sample rate that represents each road audio frequency;
C
irepresent that each road audio frequency is in the PCM sampled point number of the substandard every frame audio frequency of selected audio;
K represents the byte number of each TS bag.
8. method according to claim 1, is characterized in that, described video is filled code check B
fillcomputing formula be:
Wherein,
M represents program tricks;
F
ithe video frame rate that represents each programs;
K represents the byte number of each TS bag.
9. method according to claim 1, is characterized in that, described video code rate B
videocomputing formula be: B
video=B
tS-B
pAT-B
pMT-B
pSI-B
audio-B
fill.
10. method according to claim 1, is characterized in that, described video elementary code stream code check E
videocomputing formula be:
Wherein,
184 represent the maximum load byte number of each TS bag;
K represents the byte number of each TS bag.
11. 1 kinds of systems of automatically distributing transport stream video elementary code stream code check, is characterized in that, this system comprises: dispensing unit, and for configure transport stream total bitrate B according to application demand
tS, the Program Association Table Program Map Table that sends cycle, program tricks, each programs sends cycle, optional program specific information quantity, each optional program specific information and sends cycle, the audio frequency way of each programs, the video frame rate of the coding standard of each road audio frequency, audio sample rate, audio frequency elementary stream code check and each programs;
Program Association Table code check acquiring unit, for obtaining Program Association Table code check B according to described program tricks, Program Association Table transmission cycle
pAT;
Program Map Table code check acquiring unit, for obtaining Program Map Table code check B according to the Program Map Table transmission cycle of described program tricks, each programs
pMT;
Optional program specific information code check acquiring unit, for obtaining the code check B of optional program specific information according to the transmission cycle of the quantity of optional program specific information, each optional program specific information
pSI;
Audio code rate acquiring unit, for obtaining audio code rate B according to the coding standard of the audio frequency way of described each programs, each road audio frequency, audio sample rate, audio frequency elementary stream code check
audio;
Video is filled code check acquiring unit, for obtain video according to the video frame rate of described program tricks, each programs, fills code check B
fill;
Video code rate acquiring unit, for according to described transport stream total bitrate B
tS, Program Association Table code check B
pAT, Program Map Table code check B
pMT, optional program specific information code check B
pSI, audio code rate B
audio, video fills code check B
fillobtain video code rate B
video;
Video elementary code stream code check acquiring unit, for obtaining video elementary code stream code check E according to described video code rate
video;
Video elementary code stream Data Rate Distribution unit, for according to described video elementary code stream code check E
videothe bit rate output of configuration video encoder.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210016883.6A CN102572521B (en) | 2012-01-18 | 2012-01-18 | Method and system for automatically distributing code rate of basic video code stream of transmission stream |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210016883.6A CN102572521B (en) | 2012-01-18 | 2012-01-18 | Method and system for automatically distributing code rate of basic video code stream of transmission stream |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102572521A CN102572521A (en) | 2012-07-11 |
CN102572521B true CN102572521B (en) | 2014-04-02 |
Family
ID=46416795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210016883.6A Expired - Fee Related CN102572521B (en) | 2012-01-18 | 2012-01-18 | Method and system for automatically distributing code rate of basic video code stream of transmission stream |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102572521B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686185A (en) * | 2013-11-28 | 2014-03-26 | 成都时代星光科技有限公司 | Method for increasing transmission capacity of valid data of wireless image transmission COFDM (coded orthogonal frequency division multiplexing) modulation module |
CN111131858B (en) * | 2019-12-30 | 2022-03-08 | 杭州当虹科技股份有限公司 | Method for fixing code rate based on TS video PID |
CN113141520B (en) * | 2020-01-17 | 2022-04-01 | 北京达佳互联信息技术有限公司 | Video stream transmission method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1722835A (en) * | 2004-06-14 | 2006-01-18 | 美国博通公司 | Bit rate automatic gear |
CN101242532A (en) * | 2007-12-12 | 2008-08-13 | 浙江万里学院 | A code rate control method oriented to multi-view point video |
CN101287129A (en) * | 2008-05-20 | 2008-10-15 | 上海交通大学 | Code rate distributing method of channel code in source and channel combined coding |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100505699B1 (en) * | 2003-08-12 | 2005-08-03 | 삼성전자주식회사 | Encoding rate controller of video encoder providing for qualitative display using real time variable bit-rate control, video data transmission system having it and method thereof |
-
2012
- 2012-01-18 CN CN201210016883.6A patent/CN102572521B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1722835A (en) * | 2004-06-14 | 2006-01-18 | 美国博通公司 | Bit rate automatic gear |
CN101242532A (en) * | 2007-12-12 | 2008-08-13 | 浙江万里学院 | A code rate control method oriented to multi-view point video |
CN101287129A (en) * | 2008-05-20 | 2008-10-15 | 上海交通大学 | Code rate distributing method of channel code in source and channel combined coding |
Also Published As
Publication number | Publication date |
---|---|
CN102572521A (en) | 2012-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10945021B2 (en) | Receiving method, receiving device, and transmission and reception system | |
US10349091B2 (en) | Transmitting method, receiving method, transmitting device, and receiving device | |
CA2667571C (en) | Method and apparatus for transmitting broadcast, method and apparatus for receiving broadcast | |
US11064229B2 (en) | Transmitting device, receiving device, transmitting method and receiving method | |
KR100552678B1 (en) | Apparauts and method for transmitting and receiving with reducing the setup time of data packet | |
US6456782B1 (en) | Data processing device and method for the same | |
US10728609B2 (en) | Receiving device and receiving method | |
CN101558589B (en) | For send broadcast method and apparatus, for receiving the method and apparatus of broadcast | |
CN101951506B (en) | System and method for realizing synchronous transmitting and receiving of scalable video coding service | |
CN101151829A (en) | Buffering in streaming delivery | |
JP2007104085A (en) | Digital broadcast method and apparatus employing communication line | |
CN101729908B (en) | Synchronous multiplexing method for video and audio of transmission stream | |
US11758201B2 (en) | Transmitting method, receiving method, transmitting device, and receiving device | |
CN102572521B (en) | Method and system for automatically distributing code rate of basic video code stream of transmission stream | |
US10506265B2 (en) | Transmitting method, receiving method, transmitting device and receiving device | |
CN102104795A (en) | Method for multiplexing program stream (PS) paths into transport stream (TS) path based on moving picture experts group (MPEG)-2 | |
JP2002535934A (en) | Method and apparatus for delivering reference signal information at specified time intervals | |
CN101959062B (en) | Data transmission method, system and device for mobile multimedia broadcasting system | |
CN113747209B (en) | Method and device for reorganizing multi-channel TS (transport stream) programs | |
EP2180710A1 (en) | Method for processing a stream of multiplexed packets transporting multimedia data according to an MPEG-2 type format | |
CN102934435A (en) | Video display device | |
CN1625262A (en) | Framing method based on LDPC | |
CN111131858B (en) | Method for fixing code rate based on TS video PID | |
CN111770364B (en) | Video code rate smoothing method and device | |
US11350154B2 (en) | Receiving method, receiving device, and transmission and reception system |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140402 |