CN100496129C - H.264 based multichannel video transcoding multiplexing method - Google Patents

H.264 based multichannel video transcoding multiplexing method Download PDF

Info

Publication number
CN100496129C
CN100496129C CN200710023476.7A CN200710023476A CN100496129C CN 100496129 C CN100496129 C CN 100496129C CN 200710023476 A CN200710023476 A CN 200710023476A CN 100496129 C CN100496129 C CN 100496129C
Authority
CN
China
Prior art keywords
stream
video
mpeg
multiplexing
transcoding
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
Application number
CN200710023476.7A
Other languages
Chinese (zh)
Other versions
CN101068366A (en
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.)
Nanjing University
Original Assignee
Nanjing University
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 Nanjing University filed Critical Nanjing University
Priority to CN200710023476.7A priority Critical patent/CN100496129C/en
Publication of CN101068366A publication Critical patent/CN101068366A/en
Application granted granted Critical
Publication of CN100496129C publication Critical patent/CN100496129C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An escape-code complexing method based on H.264 multi-path video includes applying fast conversion means of MPEG-2 to H.264 code and utilizing H.264 macro-block mode to select relativity to MPEG-2 motion compensation residual error as well as utilizing motion compensation residual error and MB mode as well as mapped H.264 macro-block mode obtained by MPEG-2 decoding to synthesize TS stream and to input multi-path MPEG-2 program stream to escape code complex server by SI interface through PCI bus and outputting escape-coded and complexed single H.264 video stream through PCI bus in ASI interface mode.

Description

Based on the method for multichannel video transcoding multiplexing H.264
Technical field
The invention belongs to video compression coding and multiplexing field in the Digital Television.Especially relate to based on the H.264 method and the multiplexer of multichannel video transcoding multiplexing.
Background technology
Mobile digital TV develops rapidly at home in recent years, but vision bandwidth has fettered the expansion of digital video service.In order to take into account code stream efficiency of transmission and video image quality, the common transmission rate of system is at 6~10Mbps.And the digital TV video frequency video program adopts the MPEG-2 video compression standard more, and picture size is bigger.Such as, the MPEG-2 code check of SD is about 4Mbps, and the MPEG-2 code check of high definition is about 10Mbps.Mobile digital TV user's bandwidth generally is difficult to satisfy the real-time Transmission of the video flowing of the high code check of multichannel, can watch more mobile digital TV program smoothly under the situation of lower bandwidth in order to make the user, needs to reduce the code check of video flowing.Add the restriction of storage volume and the appearance of various different digital television terminals, make digital cable customers the video coding technique demand is more and more urgent efficiently.
Do not adopt in the Digital Television information source before the compressed encoding standard of low code check, high definition, the present solution of the problems referred to above has two, and the first is carried out high compression with the digital videos such as MPEG-2 of high code check, transfers the MPEG-2 digital video of low code check to; It two is that the digital videos such as MPEG-2 of high code check are carried out transcoding, transfers H.264 digital video to.First method will cause image quality to descend significantly, and is obviously inadvisable, and second method then can obtain more high compression efficiency and more low transmission code check under the situation that reduces image quality hardly.
Compare with MPEG-2, H.264 under equal picture quality, can improve the compression efficiency more than 4 times.As seen above-mentioned second method is more desirable.But H.264 as simple video compression standard, not about the synthetic content that reaches aspects such as multiplexed transmission of audio frequency and video.There is not at present specialized apparatus to realize that MPEG-2 is to H.264 video code conversion and multiplexing yet.Consider that TV station's original MPEG-2 headend equipment quantity is many and very expensive, abandon existing a large amount of MPEG-2 headend equipment, comprise Digital Video, nonlinear images editing saving device, this is unpractical.How to ensure picture quality, reduce the bandwidth of image simultaneously significantly, promptly make up the transcoding multiplexing special equipment and become the task of top priority.
Do not relate in the prior art based on the H.264 method and the multiplexer of multichannel video transcoding multiplexing.As CN1745573 image pick up equipment and moving picture photographing method thereof, the image pick-up device of under the moving picture photographing pattern, working, before wherein moving picture photographing begins, indicate by the shutter release button on key input part (12), the clock frequency of control section (10) is set to common frequencies, thereby reduce power consumption under the monitor state with extending battery life, and wherein, when the indication moving picture photographing begins, by clock conversion and control part (101) this clock frequency is significantly increased, thereby make during the motion picture data are carried out decoding processing, mpeg converter (7) can be stored yuv data by high speed access, reference data for example, the SDRAM of search data etc. (8), and can carry out Real Time Compression to motion picture.
CN1567271 possesses the MPEG code stream conversion acquisition method and the device of express network interface, data filter, the PID that realizes transport stream in equipment revises, information on services inserts and rate conversion, and equipment has the Fast Ethernet interface and is used for the object transmission after the conversion spread and delivers to computer.Realize the direct collection of code stream, also can handle code stream.
CN1633180 comprises wanting encoded signals to implement conversion 1~n based on the multi-description video coding method of conversion and data fusion; Respectively the signal behind conversion 1~n is quantized and entropy coding; Respectively according to separately path 1~n to quantize and entropy coding after signal 1~n decode; Respectively decoded signal 1~n is carried out inverse transformation; Obtain the limit after the inverse transformation respectively and describe 1~n, the data fusion after 1~n the inverse transformation is become steps such as center description.It can combine the multiple description coded and video coding based on conversion and data fusion, and to one group of video sequence, this coding method can produce a plurality of MPEG code streams, can restore a video sequence that distortion is bigger from each code stream; When a plurality of code streams are received, the less video sequence of distortion will be reduced out.
Summary of the invention
The present invention proposes on the basis of original MPEG-2 mobile digital TV, increase special-purpose H.264 video transcoding multiplexing server, and adopt the video code conversion algorithm of transform domain, reduce the transcoding complexity.Realized that with software mode multichannel MPEG-2 is to H.264 transcoding, the multiplexing and demultiplexing of video and audio frequency and the multichannel multiplexing and demultiplexing of program H.264 H.264.
The technical scheme that the realization of this transcoding multiplexing device is adopted is as follows: based on the H.264 method and the multiplexer of multichannel video transcoding multiplexing, input is the single program stream of multichannel MPEG-2, output is one tunnel Polymera stream H.264, realize MPEG-2 to the demultiplexing of H.264 video code conversion, audio frequency and video and multiplexing, multichannel program multiplexing H.264, its video code conversion comprises the conversions of code check, resolution and form.MPEG-2 adopts transcoding algorithm based on machine learning to H.264 video code conversion algorithm, realizes code check, resolution is adjustable, in the frame, interframe adopts different algorithms.MPEG-2 is to the fast conversion method such as following of sign indicating number H.264.When synthetic TS flows, rewrite pid value according to certain rules again, can not be correctly decoded with the decoder of avoiding the PID conflict to cause.When synthetic TS flows, the stream type field of pmt table is made corresponding modification.Multichannel MPEG-2 program stream is imported the transcoding multiplexing server with the ASI interface by pci bus, single channel behind the transcoding multiplexing H.264 video flowing is exported with the ASI interface mode by pci bus, and the half-full signal that uses FIFO to provide reads data fifo or writes FIFO, to avoid CPU frequent access pci interface.MPEG-2 is to H.264 transcoding and the H.264 video flowing behind the multichannel transcoding and audio stream is multiplexing finishes in same server.
TS stream is wrapped according to certain form packing formation PES by the elementary stream (ES) after encoding, add some system informations again and constitute, at transmitting terminal, the PES packing of basic stream is finished by the audio/video encoder, sound, video data stream and the auxiliary data flow of multiplexer received code end, according to certain multiplexing method it being interweaved becomes single TS stream.In order to realize sound, audio video synchronization, in code stream, also must add the sign of various times and the control information of system.For receiving terminal, then just in time opposite with the transmitting terminal process.
MPEG-2 is to H.264 video code conversion: from the MPEG-2 video to the transcoding of video H.264, mainly contain two kinds of frameworks at present: based on the cascade system transcoding (CPDT) of pixel domain with based on the transcoding (DDT) in DCT territory.Cascade system transcoding based on pixel domain is exactly first complete decoding, processes in pixel domain, recompile again.Because coded portion and decoded portion are structurally independent fully during secondary coding, therefore transcoding has very big flexibility, but the motion vector and the coding mode of macro block data have all been done calculating again, and transcoding efficiency is low, as realizing by software entirely, be difficult to the requirement that reaches real-time.Based on the transcoding (DDT) in DCT territory directly in the DCT territory to revaluation such as DCT coefficient, motion vectors, computation complexity is low, but flexibility is restricted, and when requiring to change motion vector, code check, resolution etc., just is difficult to adopt this architecture.
MPEG-2 of the present invention arrives the H.264 fast conversion method of sign indicating number, utilize H.264 Macroblock Mode Selection and the correlation between the MPEG-2 motion compensated residual, H.264 the Macroblock Mode Selection problem is converted into the data qualification problem, and the motion compensated residual, MB pattern, the coded block pattern (CBPC) that utilize the MPEG-2 decoding to obtain are mapped directly to macro block mode H.264; When the MPEG-2 sign indicating number is decoded, preserve relevant MB information, comprise that (sub-MB with 4 * 4 calculates respectively for the average of MB coding mode, encoding block type (CBPC), MB residual error and variance, totally 16 averages and variance), H.264 the encoder of its decoding back employing standard is to the YUV image encoding, and preserve H.264MB coding mode, and adopt machine learning algorithm to obtain decision tree, be used for the H.264 classification of coding mode; When the MPEG-2 code stream decoding, obtain MC residual error, macro block mode, the coded block pattern (CBPC) of MPEG-2, and calculate the average and the variance of 4 * 4 sub-piece MC residual errors; Macro-block coding pattern in obtaining H.264 by decision tree; When H.264 encoding, to the coding mode indirect assignment of MB; H.264 encoder be input as decoded yuv data of MPEG-2 and MB coding mode, do not use the motion vector of MPEG-2, when estimation, use the MB coding mode that obtains by decision tree.Its transcoding algorithm block diagram as shown in Figure 1.
The method that obtains decision tree is: decision tree classification should be followed principle:
1) list entries is divided into the grader of Intra, Skip, Inter16 * 16 and Inter8 * 8;
2) Inter16 * 16 are divided into 16 * 16,16 * 8,8 * 16 grader;
3) inter8 * 8 are divided into 8 * 8,8 * 4,4 * 8,4 * 4 grader.
Decision tree generates should follow principle:
1) if the MC of MPEG-2MB does not encode, promptly do not have non-zero MV, 48 * 8 do not have code coefficient, H.264MB will be encoded into 16 * 16, need to differentiate by the decision tree secondary, select optimization model;
2) if MPEG-2MB is the intra pattern, then in H.264, this MB is encoded into intra or inter8 * 8, if be encoded into intra, algorithm stops; If inter8 * 8 need to select optimization model by the secondary judgement;
3) if MPEG-2MB is the skip pattern, in H.264, this MB also is the skip pattern.
4) decision tree generates by the WEKA Data Mining Tools.The file format of the data mining program of WEKA is ARFF (Attribute-Relation File Format).An ARFF file adopts American Standard Code for Information Interchange to write, and reflects one group of correlation between attribute.Generally comprise two different sections: 1) file header comprises title, attribute and the type of relation; 2) data.
5) training set is made up of the MPEG-2 sequence of high code check, does not comprise the B frame.Decision set by the MPEG-2 code stream decoding after, H.264 recompile obtains.In cataloged procedure H.264, quantization parameter is 25, uses RD to optimize and obtains macro-block coding pattern.
The transcoding decision tree comprises Three Estate, adopts 3 different WEKA trees, as shown in Figure 2:
1) list entries is divided into the grader of Intra, Skip, Inter16 * 16 and Inter8 * 8;
2) Inter16 * 16 are divided into 16 * 16,16 * 8,8 * 16 grader;
3) inter8 * 8 are divided into 8 * 8,8 * 4,4 * 8,4 * 4 grader.
First WEKA decision tree, training dataset has used average and variance, macro block mode (skip, intra and 3 kinds of non-intra are respectively with 0,1,2,4,8 signs), coded block pattern (CBPC) and the coding mode H.264MB of 16 4 * 4 sub-piece residual errors in macro block of MPEG-2.
The capable sample of the example of ARFF data segment is used to train decision-tree model, and delegation represents a macro block sample.
Second decision tree, training sample set has used the average of 16 4 * 4 sub-piece residual errors in macro block of MPEG-2 and variance, macro block mode (3 kinds of non-intra), coded block pattern (CBPC) and 16 * 16 sub-coding mode (16 * 16 H.264MB, 16 * 8,8 * 16).This decision tree has determined the final coding mode of inter 16 * 16.
The 3rd decision tree, training sample set has used the average of 44 * 4 sub-piece residual errors in macro block of MPEG-2 and variance, macro block mode (3 kinds of non-intra), coded block pattern (CBPC) and 8 * 8 sub-coding mode (8 * 8 H.264MB, 8 * 4,4 * 8,4 * 4).
Based on these training files, use the J48 algorithm to generate decision tree by the WEKA Data Mining Tools.The J48 algorithm is proposed by Ross Quinlan, has a wide range of applications in the data mining field.
TS stream is multiplexing
Realize the multiplexing and synchronous of sound, video data for the H.264 video of multi-channel program behind the transcoding and the audio frequency of original program according to the MPEG-2 system layer, and synthetic one road TS stream of multi-channel program (transport stream) is transmitted.TS stream is wrapped according to certain form packing formation PES by the elementary stream (ES) after encoding, add some system informations again and constitute, at transmitting terminal, the PES packing of basic stream is finished by the audio/video encoder, sound, video data stream and the auxiliary data flow of multiplexer received code end, according to certain multiplexing method it being interweaved becomes single TS stream.In order to realize sound, audio video synchronization, in code stream, also must add the sign of various times and the control information of system.For receiving terminal, then just in time opposite with the transmitting terminal process.
Transport stream can be made of a plurality of programs, and each program can be combined with each other by a plurality of streams, comprises video flowing, audio stream, Program Specific Information stream (PSI) etc.Wherein PSI has four types: Program Association Table (PAT), Program Map Table (PMT), network information table (NIT) and conditional access table (CAT).Multiplexer after with transcoding H.264 video and former audio frequency by the form packing of transport stream.The length of TS bag is 188 bytes, is divided into packet header and bag load two parts.Packet header 4 byte prefixes are link prefixs, comprise sync byte 0 * 47 and package identification PID, can judge the data type of its back load from PID, are video flowing, audio stream, PSI or other packet.The bag load is the actual content of bag, as the case may be, can place PES bag or PSI bag.
PSI is used for describing the composition structure that transmits stream, serves as extremely important role in system, particularly importantly pat table and pmt table in multiplexed.Provided in the pat table in one road TS stream how many programs are arranged, and the corresponding relation between it and the pmt table PID; Pmt table provided a programs concrete composition and with the corresponding relation of PID such as video, audio frequency.
In the transcoding multiplexing device, be multiplexed into Polymera one tunnel behind employing software mode MPEG-2 transmission stream (SPTS) transcoding and H.264 transmit stream (MPTS) the multichannel single programs, its block diagram of system is as shown in Figure 3.
The TS stream of multichannel single-unit order MPEG-2 inserts with the ASI interface mode, by pci bus program data is passed to the transcoding multiplexing server.The server major function is to receive 4 road MPEG-2 single program transport streams, and its video is changed into H.264 video, is multiplexed into the transport stream of a multi-channel program then, and removes empty bag, rewrites pid value and stream type field again; Extract and handle any one PSI that receives and business information (SI), itself and local these class data that produce are integrated; In addition, also need to carry out the identification process again of program clock reference PCR with system clock STC.For finishing above function, and improve system works speed as far as possible, below specific implementation has been considered some:
1) for fear of host CPU frequent access pci interface, the half-full signal that utilizes FIFO to provide, CPU read data fifo or write FIFO.For input FIFO, produce when half-full and interrupt, CPU responds interruption, with the disposable memory buffer that reads in of the data among the FIFO; For output FIFO, situation is similar, disposable FIFO is written to half-full.
2) identification of program synchronization character.Obtaining the data of a program, must find the synchronization character of TS stream packets earlier, because synchronous head is not to satisfy unique transparent principle, might be its value just in the load promptly, therefore needs searching and detecting.
3) solution of PID conflict.PID is the unique identification of loadtype in the TS stream.The pid value of different branch MPEG-2 code stream may be identical, do not revise that tend to cause can not correct decoding if do not add, and the way of solution is to rewrite pid value when synthetic TS flows according to certain rules again.For example, if the PID of program 1 is 100, one program of later every detection, new PID adds 1, and the like.
4) modification of stream type.Because the video format of the MPEG-2TS of input stream is MPEG-2, and the video format of synthetic again TS stream is for H.264, therefore need make corresponding modification to the stream type field of pmt table, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
TS flows demultiplexing
The demultiplexing of TS stream is just opposite with multiplexing flow process, and its flow process as shown in Figure 4.Receiving terminal is that 0 bag is set up pat table by detecting PID, by pat table obtain this road TS stream comprise the PID of the pmt table of each programs, thereby set up pmt table.Obtain the PID of the pairing audio frequency and video bag of every programs at last by pmt table.Receiving terminal is put into buffering area by these PID with corresponding audio, video data, so that the decoding of audio/video decoder.
Description of drawings
Fig. 1 is that MPEG-2 arrives video code conversion algorithm block diagram H.264.
Fig. 2 MPEG-2 arrives H.264 video code translator decision tree block diagram.
Fig. 3 is the transcoding multiplexing block diagram of multichannel Single Program Transport Stream.
Fig. 4 is TS stream demultiplexing flow process figure.
Fig. 5 is the application block diagram of video code conversion in mobile digital TV.
Fig. 6 is the corresponding relation figure that TS stream is respectively shown PID.
Embodiment
In mobile digital TV system based on MPEG-2, video content mainly comes from MPEG-2 library of programmes, satellite television, and video living broadcast programs, by multiplexer with a plurality of MPEG-2 program streams multiplexing after, carry out the chnnel coding modulation, carry out the Digital Television wireless transmission then.
Introducing based on video transcoding multiplexing device H.264 after, system architecture is as shown in Figure 5.It is actually MPEG-2 library of programmes and the reach of MPEG-2 program stream, on the one hand, sets up H.264 video frequency program storehouse by static transcoding, selects for use for Play System; On the other hand, the MPEG-2 program stream to satellite television and net cast carries out the dynamic real-time transcoding, the code check of reduction video flowing, spatial resolution, the frame per second of change video flowing, the transmission demand of adaptation rear end.To overlap H.264 by software repeated usage behind the transcoding synthetic one road TS stream of program transmits more.
The TS stream of multichannel single-unit order MPEG-2 inserts the video transcoding multiplexing device with the ASI interface mode, by pci bus program data is passed to the transcoding multiplexing server.Server receives multichannel MPEG-2 single program transport stream, and its video is changed into H.264 video, is multiplexed into the transport stream of a multi-channel program then, and by the output of ASI interface.
In the MPEG-2 single channel program stream of input, the PID of detected first programs is 100, whenever detects a programs later on, and when synthetic TS flowed, new PID added 1.Because the video format of the MPEG-2TS of input stream is MPEG-2, and the video format of synthetic again TS stream is for H.264, need make corresponding modification to the stream type field of pmt table, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
MPEG-2 classification of adopting in the fast conversion method of sign indicating number H.264 based on decision tree:
The average of the Data Mining Tools WEKA analysis of MPEG-2 macro block residual error that use is increased income and variance, coding mode, encoding block type (CBPC) are obtained H.264 macro-block coding pattern.The decision tree of this transcoder comprises 3 WEKA decision trees, identifies with grey in Fig. 2.First WEKA decision tree is used to differentiate skip, Intra, 8 * 8,16 * 16 patterns, if 8 * 8 patterns or 16 * 16 patterns, then uses second or the 3rd decision tree to adjudicate the final pattern of this MB.Calculate the decision level of average and variance in the decision tree by the WEKA instrument.The work of decision tree is as follows:
Node 1: that import this node is MPEG-2 coding MB.By detecting the residual error size of MPEG-2MB, the coded system of MB is divided into 4 classes: skip, Intra, 8 * 8 or 16 * 16.The Intra decision process is not discussed in patent, and other situations need to carry out the decision-making classification second time according to the classification situation of front.When generating decision tree, will use following rule:
1) if the MC of MPEG-2MB does not encode, promptly do not have non-zero MV, 48 * 8 do not have code coefficient.H.264MB will be encoded into 16 * 16.Need to differentiate, select optimization model by the decision tree secondary.
2) if MPEG-2MB is the intra pattern, then in H.264, this MB is encoded into intra or inter8 * 8.If be encoded into intra, algorithm stops; If inter8 * 8 need to select optimization model by the secondary judgement.
3) if MPEG-2MB is the skip pattern, in H.264, this MB also is the skip pattern.
Node 2: importing this node is the 16 * 16MB that is told by node 1, and this node is with second WEKA decision tree, to pattern (16 * 16,16 * 8 or 8 * 16) classification H.264MB.Detecting 16 * 8 or 8 * 16 sub-pieces and whether generate better prediction, is 16 * 8 or 8 * 16 if differentiate, and then is final coding mode, otherwise, will continue to differentiate by node 4.
Node 3: the 8 * 8MB that tells by node 1 that imports this node.This node is with the 3rd WEKA decision tree, sub-macro block H.2648 * 8 selected optimization model: 8 * 8,8 * 4,4 * 8,4 * 4.This decision tree is carried out 4 times, respectively 48 * 8 sub-pieces in the macro block is differentiated once, and this part is only used 44 * 4 average and variance in 8 * 8 sub-pieces.
Node 4: what import this node is skip mode block of being told by node 1 or 16 * 16 mode blocks of being told by node 2.This node is estimated H.26416 * 16 pattern (not comprising 16 * 8 and 8 * 16 patterns), and selecting optimization model is skip or inter16 * 16.
The judgement of MB pattern and the selection of threshold value determine that by quantization parameter (QP) H.264 along with the difference of QP, the threshold value of average and variance is also different.Solve this situation two kinds of methods can be arranged: 1) each QP is generated a decision tree, when H.264 encoding,, select corresponding decision trees according to used QP value; 2) only generate a decision tree, adjust the thresholding of average and variance according to the QP value.For first method, in a transcoder, need to generate 52 different decision trees, and each needs 3 WEKA decision trees, therefore need 156 WEKA decision trees altogether.In H.264, QP value and quantization step have certain relation, the every increase by 6 of QP, and quantization step doubles, and therefore can adjust the threshold value of average and variance by this relation.In this transcoder, adopted second method.Generated QP and be 25 decision tree, other QP values can realize by adjusting threshold level.When QP increased by 6, threshold value improved 2.5%, otherwise reduces by 2.5%.
At the TS of receiving terminal stream demultiplexing, be that 0 bag is set up pat table by detecting PID, by pat table obtain this road TS stream comprise the PID of the pmt table of each programs, thereby set up pmt table.Obtain the PID of the pairing audio frequency and video bag of every programs at last by pmt table, as shown in Figure 6.Receiving terminal is put into buffering area by these PID with corresponding audio, video data, is decoded by audio/video decoder.
Synthetic TS rewrites pid value when flowing according to certain rules again, for example, if the PID of program 1 is 100, one program of later every detection, new PID adds 1, and the like; When synthetic TS flows the stream type field of pmt table is made corresponding modification, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
Packing forms the PES bag to elementary stream (ES) according to certain form, adds some system informations (as business information (SI), system clock information etc.) again and constitutes.
PSI is used for describing the composition structure that transmits stream, and how many programs have provided one road TS in multiplexed in the pat table has in flowing, and the corresponding relation between it and the pmt table PID; Pmt table provided a programs concrete composition and with the corresponding relation of PID such as video, audio frequency; And the modification of employing stream type: because the video format of the MPEG-2TS of input stream is MPEG-2, and the video format of synthetic again TS stream is for H.264, stream type field to pmt table is made corresponding modification, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
The TS stream of multichannel single-unit order MPEG-2 inserts with the ASI interface mode, by pci bus program data is passed to the transcoding multiplexing server; Server receives 4 road MPEG-2 single program transport streams, and its video is changed into H.264 video, is multiplexed into the transport stream of a multi-channel program then, and removes empty bag, rewrites pid value and stream type field again; Extract and handle any one PSI that receives and business information (SI), itself and local these class data that produce are integrated.In addition, also need to carry out the identification process again of program clock reference PCR with system clock STC.During TS stream demultiplexing, receiving terminal is that 0 bag is set up pat table by detecting PID, by pat table obtain this road TS stream comprise the PID of the pmt table of each programs, thereby set up pmt table; Obtain the PID of the pairing audio frequency and video bag of every programs at last by pmt table.Receiving terminal is put into buffering area by these PID with corresponding audio, video data, is decoded by audio/video decoder.
The invention process flow process also comprises: based on the method for multichannel video transcoding multiplexing H.264, input is the single program stream of multichannel MPEG-2, output is one tunnel Polymera stream H.264, realize MPEG-2 to the demultiplexing of H.264 video code conversion, audio frequency and video and multiplexing, multichannel program multiplexing H.264, its video code conversion comprises the conversions of code check, resolution and form; MPEG-2 adopts MPEG-2 to arrive the H.264 fast conversion method of sign indicating number to video code conversion algorithm H.264, utilize H.264 Macroblock Mode Selection and the correlation between the MPEG-2 motion compensated residual, H.264 the Macroblock Mode Selection problem is converted into the data qualification problem, and the motion compensated residual, MB pattern, the coded block pattern (CBPC) that utilize the MPEG-2 decoding to obtain are mapped directly to macro block mode H.264; When the MPEG-2 code stream decoding, preserve relevant MB information, the average and the variance that comprise MB coding mode, encoding block type, MB residual error, H.264 the encoder of its decoding back employing standard is to the YUV image encoding, and preserve H.264MB coding mode, adopt machine learning algorithm to obtain decision tree, be used for the H.264 classification of coding mode; When the MPEG-2 code stream decoding, obtain MC residual error, macro block mode, the coded block pattern (CBPC) of MPEG-2, and calculate the average and the variance of 4 * 4 sub-piece MC residual errors; Macro-block coding pattern in obtaining H.264 by decision tree; When H.264 encoding, to the coding mode indirect assignment of MB; H.264 encoder be input as decoded yuv data of MPEG-2 and MB coding mode: when estimation, use the MB coding mode that obtains by decision tree; Realize code check, resolution is adjustable, in the frame, interframe adopts different algorithms; And synthetic TS stream is imported transcoding multiplexing server with the ASI interface by pci bus at multichannel MPEG-2 program stream, and the single channel behind the transcoding multiplexing H.264 video flowing is exported with the ASI interface mode by pci bus; TS stream is wrapped according to certain form packing formation PES by the elementary stream (ES) after encoding, add system information again and constitute, at transmitting terminal, the PES packing of basic stream is finished by the audio/video encoder, sound, video data stream and the auxiliary data flow of multiplexer received code end, according to certain multiplexing method it being interweaved becomes single TS stream; In code stream, add the sign of various times and the control information of system; For receiving terminal, then just in time opposite with the transmitting terminal process.Synthetic TS rewrites pid value again when flowing.
The half-full signal that utilizes FIFO to provide when the MPEG-2 code stream decoding, CPU read data fifo or write FIFO; For input FIFO, produce when half-full and interrupt, CPU responds interruption, with the disposable memory buffer that reads in of the data among the FIFO; For output FIFO, disposable FIFO is written to half-full.
Transport stream can be made of a plurality of programs, and each program can be combined with each other by a plurality of streams, comprises video flowing, audio stream, Program Specific Information stream PSI; Wherein Program Specific Information stream PSI has four types: Program Association Table PAT, Program Map Table PMT, network information table (NIT) and conditional access table (CAT); Multiplexer after with transcoding H.264 video and former audio frequency by the form packing of transport stream.The length of TS bag is 188 bytes, is divided into packet header and bag load two parts; Packet header 4 byte prefixes are link prefixs, comprise sync byte 0 * 47 and package identification PID, judge the data type of its back load from PID, are video flowing, audio stream, PSI or other packet; The bag load is the actual content of bag, places PES bag or PSI bag.
PSI is used for describing the composition structure that transmits stream, and how many programs have provided one road TS in multiplexed in the pat table has in flowing, and the corresponding relation between it and the pmt table PID; Pmt table provided a programs concrete composition and with the corresponding relation of PID such as video, audio frequency; And the modification of employing stream type: because the video format of the MPEG-2TS of input stream is MPEG-2, and the video format of synthetic again TS stream is for H.264, stream type field to pmt table is made corresponding modification, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
The TS stream of multichannel single-unit order MPEG-2 inserts with the ASI interface mode, by pci bus program data is passed to the transcoding multiplexing server; Server receives 4 road MPEG-2 single program transport streams, and its video is changed into H.264 video, is multiplexed into the transport stream of a multi-channel program then, and removes empty bag, rewrites pid value and stream type field again; Extract and handle any one PSI that receives and business information (SI), itself and local these class data that produce are integrated.
Also need to carry out the identification process again of program clock reference PCR with system clock STC.
During TS stream demultiplexing, receiving terminal is that 0 bag is set up pat table by detecting PID, by pat table obtain this road TS stream comprise the PID of the pmt table of each programs, thereby set up pmt table; Obtain the PID of the pairing audio frequency and video bag of every programs at last by pmt table; Receiving terminal is put into buffering area by these PID with corresponding audio, video data, is decoded by audio/video decoder.

Claims (9)

1, based on the method for multichannel video transcoding multiplexing H.264, it is characterized in that input is the single program stream of multichannel MPEG-2, output is one tunnel Polymera stream H.264, realize MPEG-2 to the demultiplexing of H.264 video code conversion, audio frequency and video and multiplexing, multichannel program multiplexing H.264, its video code conversion comprises the conversions of code check, resolution and form; MPEG-2 adopts MPEG-2 to arrive the H.264 fast conversion method of sign indicating number to video code conversion algorithm H.264, utilize H.264 Macroblock Mode Selection and the correlation between the MPEG-2 motion compensated residual, H.264 the Macroblock Mode Selection problem is converted into the data qualification problem, and the motion compensated residual, MB pattern, the coded block pattern (CBPC) that utilize the MPEG-2 decoding to obtain are mapped directly to macro block mode H.264; When the MPEG-2 code stream decoding, preserve relevant MB information, the average and the variance that comprise MB coding mode, encoding block type, MB residual error, H.264 the encoder of its decoding back employing standard is to the YUV image encoding, and preserve H.264MB coding mode, adopt machine learning algorithm to obtain decision tree, be used for the H.264 classification of coding mode; When the MPEG-2 code stream decoding, obtain MC residual error, macro block mode, the coded block pattern (CBPC) of MPEG-2, and calculate the average and the variance of 4 * 4 sub-piece MC residual errors; Macro-block coding pattern in obtaining H.264 by decision tree; When H.264 encoding, to the coding mode indirect assignment of MB; H.264 encoder be input as decoded yuv data of MPEG-2 and MB coding mode: when estimation, use the MB coding mode that obtains by decision tree; Realize code check, resolution is adjustable, in the frame, interframe adopts different algorithms; And synthetic TS stream is imported transcoding multiplexing server with the ASI interface by pci bus at multichannel MPEG-2 program stream, and the single channel behind the transcoding multiplexing H.264 video flowing is exported with the ASI interface mode by pci bus; TS stream is wrapped according to certain form packing formation PES by the elementary stream (ES) after encoding, add system information again and constitute, at transmitting terminal, the PES packing of basic stream is finished by the audio/video encoder, sound, video data stream and the auxiliary data flow of multiplexer received code end, according to certain multiplexing method it being interweaved becomes single TS stream; In code stream, add the sign of various times and the control information of system; For receiving terminal, then just in time opposite with the transmitting terminal process.
2, according to claim 1 based on the method for multichannel video transcoding multiplexing H.264, the half-full signal for utilizing FIFO to provide when the MPEG-2 code stream decoding is provided, CPU reads data fifo or writes FIFO; For input FIFO, produce when half-full and interrupt, CPU responds interruption, with the disposable memory buffer that reads in of the data among the FIFO; For output FIFO, disposable FIFO is written to half-full.
3, according to claim 1 based on the method for multichannel video transcoding multiplexing H.264, rewrite pid value when it is characterized in that synthetic TS stream again.
4, according to claim 1ly it is characterized in that transport stream can be made of a plurality of programs, and each program can be combined with each other by a plurality of streams, comprise video flowing, audio stream, Program Specific Information stream PSI based on the method for multichannel video transcoding multiplexing H.264; Wherein Program Specific Information stream PSI has four types: Program Association Table PAT, Program Map Table PMT, network information table (NIT) and conditional access table (CAT); Multiplexer after with transcoding H.264 video and former audio frequency by the form packing of transport stream.
5, according to claim 4 based on the method for multichannel video transcoding multiplexing H.264, it is characterized in that the length of TS bag is 188 bytes, be divided into packet header and the bag two parts of loading; Packet header 4 byte prefixes are link prefixs, comprise sync byte 0 * 47 and package identification PID, judge the data type of its back load from PID, are video flowing, audio stream, PSI or other packet; The bag load is the actual content of bag, places PES bag or PSI bag.
6, according to claim 1 based on the method for multichannel video transcoding multiplexing H.264, it is characterized in that PSI is used for describing the composition structure that transmits stream, provided in the pat table in multiplexed in one road TS stream how many programs are arranged, and the corresponding relation between it and the pmt table PID; Pmt table provided a programs concrete composition and with the corresponding relation of PID such as video, audio frequency; And the modification of employing stream type: because the video format of the MPEG-2TS of input stream is MPEG-2, and the video format of synthetic again TS stream is for H.264, stream type field to pmt table is made corresponding modification, the stream type field of MPEG-2 is 0x02 before revising, and amended stream type field is 0x1b.
7, according to claim 1 based on the method for multichannel video transcoding multiplexing H.264, it is characterized in that the TS stream of multichannel single-unit order MPEG-2 inserts with the ASI interface mode, by pci bus program data is passed to the transcoding multiplexing server; Server receives 4 road MPEG-2 single program transport streams, and its video is changed into H.264 video, is multiplexed into the transport stream of a multi-channel program then, and removes empty bag, rewrites pid value and stream type field again; Extract and handle any one PSI that receives and business information (SI), itself and local these class data that produce are integrated.
8, according to claim 7 based on the method for multichannel video transcoding multiplexing H.264, it is characterized in that also needing to carry out the identification process again of program clock reference PCR with system clock STC.
9, according to claim 1 based on the method for multichannel video transcoding multiplexing H.264, when it is characterized in that TS stream demultiplexing, receiving terminal is that 0 bag is set up pat table by detecting PID, by pat table obtain this road TS stream comprise the PID of the pmt table of each programs, thereby set up pmt table; Obtain the PID of the pairing audio frequency and video bag of every programs at last by pmt table; Receiving terminal is put into buffering area by these PID with corresponding audio, video data, is decoded by audio/video decoder.
CN200710023476.7A 2007-06-05 2007-06-05 H.264 based multichannel video transcoding multiplexing method Expired - Fee Related CN100496129C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200710023476.7A CN100496129C (en) 2007-06-05 2007-06-05 H.264 based multichannel video transcoding multiplexing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200710023476.7A CN100496129C (en) 2007-06-05 2007-06-05 H.264 based multichannel video transcoding multiplexing method

Publications (2)

Publication Number Publication Date
CN101068366A CN101068366A (en) 2007-11-07
CN100496129C true CN100496129C (en) 2009-06-03

Family

ID=38880773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200710023476.7A Expired - Fee Related CN100496129C (en) 2007-06-05 2007-06-05 H.264 based multichannel video transcoding multiplexing method

Country Status (1)

Country Link
CN (1) CN100496129C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909211B (en) * 2010-01-04 2012-05-23 西安电子科技大学 H.264/AVC high-efficiency transcoder based on fast mode judgment

Families Citing this family (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588252B (en) * 2008-05-23 2011-07-20 华为技术有限公司 Control method and control device of multipoint conference
CN101715124B (en) * 2008-10-07 2013-05-08 镇江唐桥微电子有限公司 Single-input and multi-output video encoding system and video encoding method
CN101635854B (en) 2009-08-26 2012-07-04 腾讯科技(深圳)有限公司 Method and device for realizing transcoding merging
CN102098502B (en) * 2009-12-14 2015-06-03 无锡中星微电子有限公司 Method and device for converting coding formats
KR102159896B1 (en) 2010-04-13 2020-09-25 지이 비디오 컴프레션, 엘엘씨 Inheritance in sample array multitree subdivision
BR122020007923B1 (en) 2010-04-13 2021-08-03 Ge Video Compression, Llc INTERPLANE PREDICTION
TWI815295B (en) 2010-04-13 2023-09-11 美商Ge影像壓縮有限公司 Sample region merging
CN106358045B (en) 2010-04-13 2019-07-19 Ge视频压缩有限责任公司 Decoder, coding/decoding method, encoder and coding method
CN101945265B (en) * 2010-08-19 2013-05-08 北京市博汇科技有限公司 Bandwidth occupancy rate based multi-program constant code rate TS flow multiplexing algorithm
CN101924943B (en) * 2010-08-27 2011-11-16 郭敏 Real-time low-bit rate video transcoding method based on H.264
CN102025999B (en) * 2010-12-31 2012-05-16 北京工业大学 Video transcoding fast intra-frame predicating method based on support vector machine
CN102055983B (en) * 2011-01-26 2013-01-23 北京世纪鼎点软件有限公司 Decoding method for MVC-3D (Manual Volume Control Three-Dimensional) video based on standard H.264 decoder
WO2012106898A1 (en) * 2011-07-18 2012-08-16 华为技术有限公司 Method, device and system for transmitting and processing multi-channel audio-video
CN102256162B (en) * 2011-07-22 2013-11-06 网宿科技股份有限公司 Method and system for optimizing media-on-demand based on real-time file format conversion
EP2579595A2 (en) * 2011-09-30 2013-04-10 Broadcom Corporation Streaming transcoder with adaptive upstream and downstream transcode coordination
CN102523418B (en) * 2011-12-28 2014-05-28 深圳市九洲电器有限公司 Interface converting device, video signal converting method and audio/video equipment
CN102611935A (en) * 2012-02-29 2012-07-25 山东泰信电子有限公司 Playing method of multi-code-stream single channel
CN102802024A (en) * 2012-08-28 2012-11-28 曙光信息产业(北京)有限公司 Transcoding method and transcoding system realized in server
CN103065635A (en) * 2013-01-15 2013-04-24 哈尔滨工程大学 Stable, high-quality and real-time voice frequency transmission method based on the third generation telecommunication (3G) network
CN104038816B (en) * 2014-06-20 2017-06-23 深圳市九洲电器有限公司 A kind of video synchronization method and system
CN104363509B (en) * 2014-10-24 2018-11-16 深圳国微技术有限公司 A kind of video conversion method, device, play system and terminal
CN104768030B (en) * 2015-03-30 2018-01-26 深圳市九洲电器有限公司 Program audio synchronous broadcast method and system
CN106341622B (en) * 2015-07-06 2020-01-24 阿里巴巴集团控股有限公司 Method and device for encoding multi-channel video stream
WO2017036370A1 (en) 2015-09-03 2017-03-09 Mediatek Inc. Method and apparatus of neural network based processing in video coding
CN105306947B (en) * 2015-10-27 2018-08-07 中国科学院深圳先进技术研究院 video transcoding method based on machine learning
CN106850644A (en) * 2017-02-17 2017-06-13 山东浪潮商用系统有限公司 A kind of method that TS bags PID modifications are realized based on Java language
CN107404648B (en) * 2017-08-24 2019-12-03 中南大学 A kind of multi-channel video code-transferring method based on HEVC
CN113141521B (en) * 2020-01-17 2022-08-23 北京达佳互联信息技术有限公司 Audio and video data encoding method and device, electronic equipment and storage medium
CN111935436B (en) * 2020-09-15 2021-02-19 杭州盖视科技有限公司 Seamless switching method and system of multiple video streams at playing end

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
《RD-OPTIMIZATIONFORMPEG-2TOH.264TRANSCODING》. Gerardo Fernandez-Escribano,Hari Kalva等.Muntimedia and Expo,2006 IEEE International Conference,No.第309-312页. 2006
《RD-OPTIMIZATIONFORMPEG-2TOH.264TRANSCODING》. Gerardo Fernandez-Escribano,Hari Kalva等.Muntimedia and Expo,2006 IEEE International Conference,No.第309-312页. 2006 *
Converting DCT Coefficients to H.264/AVC. Jun Xin,Anthony Vetro,Huifang Sun.MITSUBISHI ELECTRIC RESEARCH LABORATORIES http://www.merl.com. 2004
Converting DCT Coefficients to H.264/AVC. Jun Xin,Anthony Vetro,Huifang Sun.MITSUBISHI ELECTRIC RESEARCH LABORATORIES http://www.merl.com. 2004 *
SPEEDING-UP THEMACROBLOCK PATITION MODEDESESION IN MPEG-2/H.264 TRANSCODING. Gerardo Fernandez-Escribano,Hari Kalva等.Image Processing,2006IEEE International Conference. 2006
SPEEDING-UP THEMACROBLOCK PATITION MODEDESESION IN MPEG-2/H.264 TRANSCODING. Gerardo Fernandez-Escribano,Hari Kalva等.Image Processing,2006IEEE International Conference. 2006 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101909211B (en) * 2010-01-04 2012-05-23 西安电子科技大学 H.264/AVC high-efficiency transcoder based on fast mode judgment

Also Published As

Publication number Publication date
CN101068366A (en) 2007-11-07

Similar Documents

Publication Publication Date Title
CN100496129C (en) H.264 based multichannel video transcoding multiplexing method
CN103621085B (en) Reduce method and the computing system of the delay in video decode
CN100393128C (en) Encoding device and method, decoding device and method and coding system and method
CN100496127C (en) MPEG2-H.264 code fast converting method
CN104604242B (en) Sending device, sending method, receiving device and method of reseptance
CN100334880C (en) Method and its device for transmitting and receiving dynamic image data
JP4786114B2 (en) Method and apparatus for encoding video
CN110460858B (en) Information processing apparatus and method
KR100574186B1 (en) Encoded stream splicing device and method, and an encoded stream generating device and method
CN102792689B (en) Delta compression can be carried out and for by image, remote display is presented to the amendment of estimation and metadata
CN100558168C (en) The method and apparatus that generates coded picture data and coded picture data is decoded
CN103038783B (en) Adaptive video decoding circuit and method thereof
CN101877789A (en) Encoder-assisted adaptive video frame interpolation
CN103918268A (en) Signaling of state information for a decoded picture buffer and reference picture lists
CN101909211B (en) H.264/AVC high-efficiency transcoder based on fast mode judgment
CN101164336A (en) Video information recording device, video information recording method, video information recording program, and recording medium containing the video information recording program
FI105634B (en) Procedure for transferring video images, data transfer systems and multimedia data terminal
JP4410414B2 (en) Video signal compression processing method
CN108924550A (en) A kind of multichannel is the same as resolution video code-transferring method
CN105657448A (en) Method, device and system for forwarding encoded video streams
CN105323578A (en) Statistical multiplexing method and device
CN100473158C (en) Method and apparatus for processing, transmitting and receiving dynamic image data
CN102630006A (en) Device and method for transmitting video streaming
KR100935493B1 (en) Apparatus and method for transcoding based on distributed digital signal processing
CN100334885C (en) Image signal compression coding method and apparatus

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
C53 Correction of patent of invention or patent application
CB03 Change of inventor or designer information

Inventor after: Li Bo

Inventor after: Fang Huaidong

Inventor after: Liu Li

Inventor after: Lu Baosheng

Inventor after: Yan Su

Inventor after: Chen Qimei

Inventor before: Fang Huaidong

Inventor before: Liu Li

Inventor before: Lu Baosheng

Inventor before: Yan Su

Inventor before: Chen Qimei

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: FANG HUAIDONG LIU LIU LU BAOSHENG YAN SU CHEN QIMEI TO: LI BO FANG HUAIDONG LIU LIU LU BAOSHENG YAN SU CHEN QIMEI

EE01 Entry into force of recordation of patent licensing contract

Assignee: Jiangsu Zhuo Yi Mdt InfoTech Ltd

Assignor: Nanjing University

Contract record no.: 2012320000384

Denomination of invention: H.264 based multichannel video transcoding multiplexing method and multiplexer

Granted publication date: 20090603

License type: Common License

Open date: 20071107

Record date: 20120401

EC01 Cancellation of recordation of patent licensing contract

Assignee: Jiangsu Zhuo Yi Mdt InfoTech Ltd

Assignor: Nanjing University

Contract record no.: 2012320000384

Date of cancellation: 20130531

LICC Enforcement, change and cancellation of record of contracts on the licence for exploitation of a patent or utility model
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090603

Termination date: 20130605