CN101286993A - Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream - Google Patents

Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream Download PDF

Info

Publication number
CN101286993A
CN101286993A CNA2008101114381A CN200810111438A CN101286993A CN 101286993 A CN101286993 A CN 101286993A CN A2008101114381 A CNA2008101114381 A CN A2008101114381A CN 200810111438 A CN200810111438 A CN 200810111438A CN 101286993 A CN101286993 A CN 101286993A
Authority
CN
China
Prior art keywords
medium bag
recording
time
code stream
stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008101114381A
Other languages
Chinese (zh)
Inventor
陈光亮
张建强
童登金
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNA2008101114381A priority Critical patent/CN101286993A/en
Publication of CN101286993A publication Critical patent/CN101286993A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method and equipment for recording and reestablishing bit streams, wherein, the equipment for recording bit streams comprises at least one receiving port respectively used for receiving bit streams of different formats in a media packet, wherein, the formats of the media packet comprise a video real-time transport protocol stream, a video real-time transport control protocol stream, an audio real-time transport protocol stream and an audio real-time transport control protocol stream; a recording unit is used for recording the recording time of the received media packet; a storage unit is used for storing the media packet according to the recording time recorded by the recording unit. The technical proposal can ensure that the property of the bit streams before recording is consistent with the property of the bit streams after being reestablished by recording documents, provide data source and alternate coders for a multimedia system and lower the cost of the equipment of the system.

Description

Code stream is recorded, method for reconstructing and equipment, code stream is recorded and reconstructing apparatus
Technical field
The present invention relates to the communications field, and especially, relate to a kind of code stream recording arrangement and method, code stream reconstructing apparatus and method, code stream is recorded and reconstructing apparatus.
Background technology
At the data source end of multimedia system, need equipment to produce multipath media stream, so that different media services to be provided.Therefore encoder device costs an arm and a leg, if all adopt encoder then can increase cost.
Multimedia system equipment is different with the general network equipment, and multimedia system equipment also must transmit data according to time series except the function with general networking equipment transmission data.In case input code flow has time attribute, the data of so much media device transmission will constantly change.In order to reappear the code stream of encoder output, be necessary the code stream of encoder output caught and be stored as file, and storage file is reverted to source code flow again.
RTP (Real-time TransportProtocol is adopted in the multi-media network transmission mostly, abbreviate RTP as)/RTCP Real-time Transport Control Protocol (Real-time TransportControl Protocol, abbreviate RTCP as), therefore, article one, the Media Stream that contains audio frequency and video transmits on network needs to transmit four streams in fact at least, is respectively: video rtp streaming, video RTCP stream, audio frequency rtp streaming and audio frequency RTCP stream.Method for recording commonly used is only recorded video rtp streaming payload and audio frequency rtp streaming payload, then the payload of recording is put into document container, for example, and MP4 or AVI.
When restoring file into code stream, only go back original image harmony sound sequence, temporal information rebuilds, and therefore, the temporal information of source code flow is lost, and the bit stream data bag that regenerates and the packet of source code flow are also inequality.Therefore, utilize code stream and source code flow after this method is recorded and rebuild inconsistent.
In full accord in order to guarantee to record again code stream and the source code flow rebuild, thus can place of encoder, must improve above-mentioned recording with method for reconstructing.Yet, the technical scheme that addresses the above problem is not proposed at present as yet.
Summary of the invention
Consider that the cost that uses encoder to send code stream is big, and can not guarantee to record again the code stream rebuild and the on all four problem of source code flow and make the present invention, for this reason, main purpose of the present invention is to provide a kind of code stream recording arrangement and method, code stream reconstructing apparatus and method, code stream is recorded and reconstructing apparatus, has solved the problems referred to above in the correlation technique.
According to an aspect of the present invention, provide a kind of code stream recording arrangement, be used for recording audio/video medium code stream.
Code stream recording arrangement according to the embodiment of the invention comprises: at least one receiving port, be respectively applied for the code stream of different-format in the receiving media bag, wherein, the form of medium bag comprises that real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, audio frequency transmit control protocol stream in real time; Record cell is used for recorder recording constantly to the medium bag; Memory cell is used for the medium bag constantly of recording according to recording unit records.
In addition, said memory cells further comprises: acquisition module, be used to obtain the attribute of medium bag, and wherein, the attribute of medium bag comprises medium bag type and medium bag size at least; Preserve module, be used for the medium bag being put into buffer queue according to predetermined format, and, under the full situation of buffer queue, the data in the buffer queue are write file.
Wherein, above-mentioned predetermined format is: according to the order of recording the moment, medium bag type, medium bag size, medium payload package.
In addition, above-mentioned code stream recording arrangement further comprises: judge module, be used to judge whether to arrive the recording time that sets in advance, and if judged result is for being, then the code stream recording arrangement finishes to record.
According to a further aspect in the invention, provide a kind of code stream method for recording, be used for the recording audio/video Media Stream.
Code stream method for recording according to the embodiment of the invention comprises: use at least one port receiving media bag, wherein, at least one port is respectively applied for real-time video transportation protocol stream, real-time video in the receiving media bag and transmits control protocol stream, audio frequency real time transport protocol stream, audio frequency and transmit control protocol stream in real time; Time interocclusal record the recording constantly as the medium bag of medium bag will be received; Obtain the attribute of medium bag, wherein, the attribute of medium bag comprises medium bag type and medium bag size at least; According to predetermined format the medium bag is put into buffer queue, and, under the full situation of buffer queue, the data in the buffer queue are write file.
Wherein, above-mentioned predetermined format is: according to the order of recording the moment, medium bag type, medium bag size, medium payload package order.
In addition, said method further comprises: judge whether to arrive the recording time that sets in advance, if judged result is for being, then finish to record.
In accordance with a further aspect of the present invention, provide a kind of code stream reconstructing apparatus, be used to rebuild the code stream of being recorded.
Code stream reconstructing apparatus according to the embodiment of the invention comprises: read module, and being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one and wait to send out a medium bag from sending buffering area; First judge module, be used for waiting to send out whether a medium bag is the medium bag of first transmission according to the recording time judgement for the treatment of a medium bag, if the judgment is Yes, then the medium bag of register system T0 and first transmission constantly records t0 constantly, if the judgment is No, then write down current system time Tn and wait that sending out a medium bag records tn constantly; Computing module, the judged result that is used at first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculating are waited to send out recording constantly of medium bag and are recorded difference constantly with the medium bag of first transmission, that is Deltat=tn-t0; Whether second judge module is used to judge Deltat greater than DeltaT, if the judgment is Yes, and code stream reconstructing apparatus Deltat-DeltaT time that is set to sleep; Sending module is used for sending and waits to send out the medium bag.
Wherein, the judged result that above-mentioned sending module is used at first judge module is under the situation that is, send first medium bag, the judged result of second judge module for situation not under, send and wait to send out the medium bag and after the code stream reconstructing apparatus arrives the length of one's sleep, send and wait to send out a medium bag.
In addition, above-mentioned code stream reconstructing apparatus further comprises: the 3rd judge module, be used for read module read wait to send out the medium bag before, judge in the ASCII stream file ASCII whether be sky; The 4th judge module, be used for read module read a period of time length be the medium bag of T put into send buffering area after, judge that whether the medium bag time period that sends buffering area is less than sending buffering area preset time section t; Wherein, be judged as under the situation that is at three module, a period of time is that the medium bag of T is put into the transmission buffering area in the read module readout code stream file, is judged as under the situation not end operation at three module; And, being judged as under the situation that is at four module, read module continues to read the medium bag that a period of time length is T.
In accordance with a further aspect of the present invention, provide a kind of code stream method for reconstructing, be used to rebuild the code stream of being recorded.
Code stream method for reconstructing according to the embodiment of the invention comprises: the medium bag that reads a period of time length and be T from the ASCII stream file ASCII of having recorded is put into the transmission buffering area, and takes out one and wait to send out a medium bag from sending buffering area; Wait to send out whether a medium bag is the medium bag of first transmission according to waiting the recording time judgement of sending out the medium bag, if the judgment is Yes, then the medium bag of register system T0 and first transmission constantly records t0 constantly, if interpretation is then write down current system time Tn and is waited that sending out a medium bag records tn constantly for not; Be judged as under the situation not, calculate current system time and send difference between the system time of first medium bag, that is, DeltaT=Tn-T0 and calculating are waited to send out the medium bag and are recorded constantly and record difference constantly with the medium bag of first transmission, that is Deltat=tn-t0; Whether judge Deltat greater than DeltaT, if the judgment is Yes, then sleep the Deltat-DeltaT time; Under the situation of the medium bag that is judged as first transmission, send first medium bag, and judging that DeltaT equals under the situation of Deltat, send and wait to send out the medium bag, and after arriving the length of one's sleep, send and wait to send out the medium bag.
In addition, method further comprises: read wait to send out the medium bag before, judge in the ASCII stream file ASCII whether be empty, be judged as under the situation of denying, the data in the readout code stream file are being judged as under the situation that is end operation.
In addition, method further comprises: read a period of time length be the medium bag of T put into send buffering area after, whether the medium bag time period of judging the transmission buffering area if the judgment is Yes, then continues read medium bag that a period of time length be T less than sending buffering area preset time section t.
In accordance with a further aspect of the present invention, provide a kind of code stream to record and reconstructing apparatus, be used for the audio-video frequency media code stream that recording audio/video medium code stream and reconstruction are recorded.
Record and reconstructing apparatus comprises: at least one receiving port according to the code stream of the embodiment of the invention, be respectively applied for different suitable code streams in the receiving media bag, wherein, the form of medium bag comprises that real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, audio frequency transmit control protocol stream in real time; Record cell is used for recorder recording constantly to the medium bag; Memory cell is used for the medium bag constantly of recording according to recording unit records; Read module, being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one and wait to send out a medium bag from sending buffering area; First judge module, be used for waiting to send out whether a medium bag is the medium bag of first transmission according to the recording time judgement for the treatment of a medium bag, if the judgment is Yes, then register system constantly T0 and first medium bag record t0 constantly, if interpretation is then write down current system time Tn and is waited that sending out a medium bag records tn constantly for not; Computing module, the judged result that is used at first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculating are waited to send out recording constantly of medium bag and are recorded difference constantly with the medium bag of first transmission, that is Deltat=tn-t0; Whether second judge module is used to judge Deltat greater than DeltaT, and if the judgment is Yes, then code stream is recorded and reconstructing apparatus Deltat-DeltaT time that is set to sleep.Sending module is used for sending and waits to send out the medium bag.
Pass through technique scheme, can utilize the file of recording preservation that code stream is rebuild, recover all characteristics of code stream itself, code stream attribute after assurance is recorded preceding code stream and utilized the recorded file reconstruction is consistent, can can place of encoder reduce the system equipment cost for multimedia system provides data source.
Other features and advantages of the present invention will be set forth in the following description, and, partly from specification, become apparent, perhaps understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the specification of being write, claims and accompanying drawing.
Description of drawings
Accompanying drawing is used to provide further understanding of the present invention, and constitutes the part of specification, is used from explanation the present invention with embodiments of the invention one, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is the block diagram according to the code stream recording arrangement of the embodiment of the invention;
Fig. 2 is the flow chart according to the code stream method for recording of the embodiment of the invention;
Fig. 3 is the detailed process flow chart according to the code stream method for recording of the embodiment of the invention;
Fig. 4 is the data packet format schematic diagram according to the embodiment of the invention;
Fig. 5 is the block diagram according to the code stream reconstructing apparatus of the embodiment of the invention;
Fig. 6 is the flow chart according to the code stream method for reconstructing of the embodiment of the invention;
Fig. 7 is the flow chart according to the detailed process of the code stream method for reconstructing of the embodiment of the invention;
Fig. 8 records and the block diagram of reconstructing apparatus according to the code stream of the embodiment of the invention;
Fig. 9 records and the schematic diagram of reconstructing apparatus according to the code stream of the embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein only is used for description and interpretation the present invention, and be not used in qualification the present invention.
Device embodiment one
In the present embodiment, provide a kind of code stream recording arrangement, be used for recording audio/video medium code stream, Fig. 1 is according to the block diagram of the code stream recording arrangement of the embodiment of the invention, as shown in Figure 1, comprising:
At least one receiving port 10 is respectively applied for the code stream of different-format in the receiving media bag, and wherein, the form of medium bag comprises video rtp streaming, video RTCP stream, audio frequency rtp streaming, audio frequency RTCP stream;
Record cell 12 is used for recorder recording constantly to the medium bag;
Memory cell 14 is used for the medium bag constantly of recording according to record cell 12 records.
Preferably, said memory cells 14 further comprises: acquisition module, be used to obtain the attribute of medium bag, and wherein, the attribute of medium bag comprises medium bag type and medium bag size at least; Preserve module, be used for the medium bag being put into buffer queue according to the order of recording the moment, medium bag type, medium bag size, medium payload package, and, under the full situation of buffer queue, the data in the buffer queue are write file.Wherein, Fig. 4 has provided the schematic diagram of the medium bag being put into the buffer queue form.
Preferably, above-mentioned code stream recording arrangement further comprises:
Judge module is used to judge whether to arrive the recording time that sets in advance, if judged result is for being, then the code stream recording arrangement finishes to record.
By means of technique scheme, can carry out recording of code stream by the code stream recording arrangement.
Method embodiment one
In the present embodiment, provide a kind of code stream method for recording, be used for the recording audio/video Media Stream, Fig. 2 is according to the flow chart of the code stream method for recording of the embodiment of the invention, as shown in Figure 2, may further comprise the steps:
Step S202, use at least one port receiving media bag, wherein, at least one port is respectively applied for real-time video transportation protocol stream, real-time video in the receiving media bag and transmits control protocol stream, audio frequency real time transport protocol stream, audio frequency and transmit control protocol stream in real time;
Step S204 will receive time interocclusal record the recording constantly as the medium bag of medium bag;
Step S206 obtains the attribute of medium bag, and wherein, the attribute of medium bag comprises medium bag type and medium bag size at least;
Step S208 puts into buffer queue according to predetermined format with the medium bag, and, under the full situation of buffer queue, data in the buffer queue are write file, and wherein, above-mentioned predetermined format is: according to the order of recording the moment, medium bag type, medium bag size, medium payload package order.
After step S208, judge whether to arrive the recording time that sets in advance, if judged result is for being, then finish to record.
Below, technique scheme is elaborated.Fig. 3 is according to the detailed process flow chart of the code stream method for recording of the embodiment of the invention, as shown in Figure 3, may further comprise the steps:
The first step, start-up system are prepared to receive multipath media stream, comprise receiver, video rtp streaming, video RTCP stream, audio frequency rtp streaming and audio frequency RTCP stream;
Second step, receive a packet after, the attribute of specified data bag, these attributes comprise to be recorded constantly, type of data packet and packet size are put into buffer queue according to the form shown in the accompanying drawing 4 then;
The 3rd step, judge that buffer queue is whether full, if not full then continued for second step, if would expire then with the data write-once file in the buffer queue;
The 4th step, judge whether recording time arrives, if to finish to record, go on foot otherwise continue second.
By technique scheme, realized the method that code stream is recorded.
Device embodiment two
In the present embodiment, provide a kind of code stream reconstructing apparatus, be used to rebuild the code stream of being recorded, Fig. 5 is the block diagram according to the code stream reconstructing apparatus of the embodiment of the invention.As shown in Figure 5, comprising:
Read module 50, being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one and wait to send out a medium bag from sending buffering area;
First judge module 52, be used for waiting to send out whether a medium bag is the medium bag of first transmission according to the recording time judgement for the treatment of a medium bag, if the judgment is Yes, then the medium bag of register system T0 and first transmission constantly records t0 constantly, if the judgment is No, then write down current system time Tn and wait that sending out a medium bag records tn constantly;
Computing module 54, the judged result that is used at first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculating are waited to send out recording constantly of medium bag and are recorded difference constantly with the medium bag of first transmission, that is Deltat=tn-t0;
Whether second judge module 56 is used to judge Deltat greater than DeltaT, if the judgment is Yes, and code stream reconstructing apparatus Deltat-DeltaT time that is set to sleep;
Sending module 58 is used for sending and waits to send out the medium bag.
Wherein, the judged result that above-mentioned sending module 58 is used at first judge module 52 is under the situation that is, send first medium bag, the judged result of second judge module 56 for situation not under, transmission is waited to send out the medium bag and after the code stream reconstructing apparatus arrives the length of one's sleep, is sent and wait to send out the medium bag.
In addition, above-mentioned code stream reconstructing apparatus further comprises:
The 3rd judge module, be used for read module read wait to send out the medium bag before, judge in the ASCII stream file ASCII whether be sky;
The 4th judge module, be used for read module read a period of time length be the medium bag of T put into send buffering area after, judge that whether the medium bag time period that sends buffering area is less than sending buffering area preset time section t;
Wherein, be judged as under the situation that is at three module, a period of time is that the medium bag of T is put into the transmission buffering area in the read module readout code stream file, is judged as under the situation not end operation at three module; And, being judged as under the situation that is at four module, read module continues to read the medium bag that a period of time length is T.
By technique scheme, by means of the code stream reconstructing apparatus, can realize the reconstruction of code stream, and, guaranteed the code stream of reconstruction and the seasonal effect in time series consistency that source code flows.
Method embodiment two
A kind of code stream method for reconstructing is provided in the present embodiment, has been used to rebuild the code stream of being recorded.Need to prove that the method in the present embodiment can be used in combination with the code stream method for recording that provides among the method embodiment one.Fig. 6 is according to the flow chart of the code stream method for reconstructing of the embodiment of the invention, as shown in Figure 6, may further comprise the steps:
Step S602 reads a period of time length and is the medium bag of T and puts into the transmission buffering area from the ASCII stream file ASCII of having recorded, and takes out one and wait to send out a medium bag from sending buffering area; And, read wait to send out the medium bag before, judge in the ASCII stream file ASCII whether be empty, be judged as under the situation of denying, the data in the readout code stream file are being judged as under the situation that is end operation;
And, after the step S602, further comprise: read a period of time length be the medium bag of T put into send buffering area after, judge that whether the medium bag time period that sends buffering area is less than sending buffering area preset time section t, if the judgment is Yes, then continue to read the medium bag that a period of time length is T.
Step S604, wait to send out whether a medium bag is the medium bag of first transmission according to waiting the recording time judgement of sending out the medium bag, if the judgment is Yes, then the medium bag of register system T0 and first transmission constantly records t0 constantly, if interpretation is then write down current system time Tn and is waited that sending out a medium bag records tn constantly for not;
Step S606 under situation about not being judged as not, calculates current system time and sends difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculating are waited to send out the medium bag and are recorded the difference of recording the moment constantly with the medium bag of first transmission, that is, and and Deltat=tn-t0;
Whether step S608 judges Deltat greater than DeltaT, if the judgment is Yes, then sleeps the Deltat-DeltaT time;
Step S610 under the situation of the medium bag that is judged as first transmission, sends first medium bag, and is judging that DeltaT equals under the situation of Deltat, sends and waits to send out the medium bag, and after arriving the length of one's sleep, send and wait to send out the medium bag.
Below, in conjunction with the accompanying drawings, technique scheme is elaborated.Fig. 7 is according to the flow chart of the detailed process of the code stream method for reconstructing of the embodiment of the invention, as shown in Figure 7, may further comprise the steps:
The first step, ASCII stream file ASCII that is ready to record and start-up system;
Whether in second step, judging has data in the recorded file, if do not have data then finish, is that the data of T are put into the transmission buffering area if data are arranged then read a period of time section;
In the 3rd step, whether the packet time period that judge to send buffering area less than t, if less than t then continued for second step, otherwise takes out a packet from buffering area;
The 4th step, judge whether this packet is the packet of first transmission, if judged result is for being, then register system time T 0 and this bag record moment t0, and this bag is sent to network.If judged result then carried out for the 5th step for not;
The 5th step, write down current system time Tn and this bag and record tn constantly, and calculate current time and send the difference DeltaT=Tn-T0 of first packet between constantly, calculate again this bag record constantly and first packet is recorded difference Deltat=tn-t0 between the moment;
The 6th step, whether judge Deltat greater than DeltaT, if greater than (Deltat-DeltaT) time period of sleeping otherwise carried out for the 7th step;
The 7th step sent to network with packet, carried out for the 3rd step then.
By technique scheme, by means of the code stream method for reconstructing, can realize the reconstruction of code stream, and, guaranteed the code stream of reconstruction and the seasonal effect in time series consistency that source code flows.
Device embodiment three
In the present embodiment, provide a kind of code stream to record and reconstructing apparatus, be used for the audio-video frequency media code stream that recording audio/video medium code stream and reconstruction are recorded, this equipment can use code stream recording arrangement shown in Figure 1 and code stream reconstructing apparatus shown in Figure 5 to realize, for example, Fig. 8 records and the block diagram of reconstructing apparatus according to the code stream of the embodiment of the invention.As shown in Figure 8, comprising:
At least one receiving port 802, be respectively applied for different suitable code streams in the receiving media bag, wherein, the form of medium bag comprises that real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, audio frequency transmit control protocol stream in real time;
Record cell 804 is used for recorder recording constantly to the medium bag;
Memory cell 806 is used for the medium bag constantly of recording according to recording unit records; Read module, being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one and wait to send out a medium bag from sending buffering area;
First judge module 808, be used for waiting to send out whether a medium bag is the medium bag of first transmission according to the recording time judgement for the treatment of a medium bag, if the judgment is Yes, then register system constantly T0 and first medium bag record t0 constantly, if interpretation is then write down current system time Tn and is waited that sending out a medium bag records tn constantly for not;
Computing module 810, the judged result that is used at first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculating are waited to send out recording constantly of medium bag and are recorded difference constantly with the medium bag of first transmission, that is Deltat=tn-t0;
Whether second judge module 812 is used to judge Deltat greater than DeltaT, and if the judgment is Yes, then code stream is recorded and reconstructing apparatus Deltat-DeltaT time that is set to sleep;
Sending module 814 is used for sending and waits to send out the medium bag.
Below, technique scheme is illustrated.
Adopt the multimedia bitstream flow-generator UDPCrazy of this method development, as the source of media of China Mobile multimedia broadcasting M200 multiplexer, can place of encoder as the input source of code stream, for mobile TV provides multiple media business.Concrete enforcement is as follows:
The first step starts encoder and starts the code stream that the UDPCrazy recording function prepares to record encoder, comprises video RTP bag, video RTCP bag, audio frequency RTP bag and audio frequency RTCP bag, and it is 60 minutes that recording time is set simultaneously;
Second step, the code stream that encoder sends the CCTV-1 program is set, the ASCII stream file ASCII CCTV-1.rtp by name that UDPCrazy records generation is set, UDPCrazy whenever receives a bag, and the attribute of this bag is set, and this bag is put into buffer queue, if buffer queue is full, then the attribute of medium bag in the buffering area and medium bag is write media file CCTV-1.rtp according to the form of recorded file, when recording time 60 minutes then, stop to record;
The 3rd step, repeated for second step and the code stream that encoder sends CCTV-2, CCTV-3, CCTV-4 and CCTV-5 program respectively is set, just can obtain media file CCTV-1.rtp, the CCTV-2.rtp, CCTV-3.rtp, CCTV-4.rtp and the CCTV-5.rtp that record respectively;
The 4th step, close encoder, close the UDPCrazy recording function, start the UDPCrazy code stream and rebuild function;
The 5th step, starting device M200 multiplexer, the Start-up and Adjustment device starts transmitter;
The 6th step, on UDPCrazy, increase an output code flow, the source file that this code stream is set is CCTV-1.rtp, UDPCrazy opens media file CCTV-1.rtp, form read data packet according to media file, determine that then can this packet send, if can send, then should wrap and be sent to the M200 multiplexer by network, at the code stream that increases on the M200 multiplexer after a new business receives the UDPCrazy reconstruction, and send modulator to after audio stream after will rebuilding and video flowing are multiplexing, at last by transmitter to aerial emission;
In the 7th step, repeating the source file that the 6th step was provided with code stream respectively is CCTV-2.rtp, CCTV-3.rtp, CCTV-4.rtp and CCTV-5.rtp.UDPCrazy rebuilds 5 Media Streams simultaneously and is sent to the M200 multiplexer by network;
The 8th step started receiving terminal apparatus, can receive and play the content of CCTV-1, CCTV-2, CCTV-3.rtp, CCTV-4 and CCTV-5 successively by service switchover.
Simultaneously, above-mentioned module also can be recorded and the schematic diagram of reconstructing apparatus is provided with according to code stream shown in Figure 9.As shown in Figure 9, receiver module is handled and to be used to receive code stream, and with the file access module to being connected, and a code stream of recording deposits the file access module in, rebuilding code stream is to send control module readout code stream file from the file access module that links with it, and send.Wherein the file read module is responsible for carrying out the storage of media file.
In sum, by means of technical scheme of the present invention, can utilize the file of recording preservation that code stream is rebuild, recover all characteristics of code stream itself, code stream attribute after assurance is recorded preceding code stream and utilized the recorded file reconstruction is consistent, can can place of encoder reduce the system equipment cost for multimedia system provides data source.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1. a code stream recording arrangement is used for recording audio/video medium code stream, it is characterized in that described equipment comprises:
At least one receiving port, be respectively applied for the code stream of different-format in the receiving media bag, wherein, the form of described medium bag comprises that real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, audio frequency transmit control protocol stream in real time;
Record cell is used for recorder recording constantly to described medium bag;
Memory cell is used for storing described medium bag constantly according to described the recording of described recording unit records.
2. code stream recording arrangement according to claim 1 is characterized in that, described memory cell further comprises:
Acquisition module is used to obtain the attribute of described medium bag, and wherein, the attribute of described medium bag comprises medium bag type and medium bag size at least;
Preserve module, be used for described medium bag being put into buffer queue according to predetermined format, and, under the full situation of buffer queue, the data in the described buffer queue are write file.
3. code stream recording arrangement according to claim 2 is characterized in that, described predetermined format is: according to the described order of recording the moment, medium bag type, medium bag size, medium payload package.
4. code stream recording arrangement according to claim 1, it is characterized in that described code stream recording arrangement further comprises: judge module is used to judge whether to arrive the recording time that sets in advance, if judged result is for being, then described code stream recording arrangement finishes to record.
5. a code stream method for recording is used for the recording audio/video Media Stream, it is characterized in that, described method comprises:
Use at least one port receiving media bag, wherein, described at least one port is respectively applied for the real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, the audio frequency that receive in the described medium bag and transmits control protocol stream in real time;
Time interocclusal record the recording constantly as described medium bag of described medium bag will be received;
Obtain the attribute of described medium bag, wherein, the attribute of described medium bag comprises medium bag type and medium bag size at least;
According to predetermined format described medium bag is put into buffer queue, and, under the full situation of buffer queue, the data in the described buffer queue are write file.
6. method according to claim 5 is characterized in that, described predetermined format is:
According to the described order of recording the moment, medium bag type, medium bag size, medium payload package order.
7. method according to claim 5 is characterized in that, described method further comprises:
Judge whether to arrive the recording time that sets in advance,, then finish to record if judged result is for being.
8. a code stream reconstructing apparatus is used to rebuild the code stream of being recorded, and it is characterized in that, described equipment comprises:
Read module, being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one from described transmission buffering area and wait to send out a medium bag;
First judge module, be used for judging and describedly treat whether a medium bag is the medium bag of first transmission according to the described recording time of waiting to send out the medium bag, if the judgment is Yes, then the medium bag of register system T0 and described first transmission constantly records t0 constantly, if the judgment is No, then write down current system time Tn and describedly wait to send out a medium bag and record tn constantly;
Computing module, the judged result that is used at described first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculate and describedly wait to send out recording constantly of medium bag and record difference constantly with the medium bag of described first transmission, that is Deltat=tn-t0;
Whether second judge module is used to judge Deltat greater than DeltaT, if the judgment is Yes, and described code stream reconstructing apparatus Deltat-DeltaT time that is set to sleep; Sending module is used to send the described medium bag of waiting to send out.
9. code stream reconstructing apparatus according to claim 8, it is characterized in that, the judged result that described sending module is used at first judge module is under the situation that is, send described first medium bag, the judged result of described second judge module for situation not under, send and describedly wait to send out the medium bag and after described code stream reconstructing apparatus arrives the described length of one's sleep, sends a described medium bag for the treatment of.
10. code stream reconstructing apparatus according to claim 8 is characterized in that, described code stream reconstructing apparatus further comprises:
The 3rd judge module, be used for described read module read described wait to send out the medium bag before, judge in the described ASCII stream file ASCII whether be empty;
The 4th judge module is used for after the read module medium bag that to read one section described time span be T is put into described transmission buffering area, and whether the medium bag time period of judging described transmission buffering area is less than described transmission buffering area preset time section t;
Wherein, be judged as under the situation that is at three module, it is that the medium bag of T is put into described transmission buffering area that described read module reads a period of time in the described ASCII stream file ASCII, is judged as under the situation not end operation at three module; And, being judged as under the situation that is at four module, described read module continues to read the medium bag that a period of time length is T.
11. a code stream method for reconstructing is used to rebuild the code stream of being recorded, and it is characterized in that, described method comprises:
From the ASCII stream file ASCII of having recorded, read a period of time length and be the medium bag of T and put into the transmission buffering area, and take out one from described transmission buffering area and wait to send out a medium bag;
Judge according to the described recording time of waiting to send out the medium bag and describedly to treat whether a medium bag is the medium bag of first transmission, if the judgment is Yes, then the medium bag of register system T0 and described first transmission constantly records t0 constantly, if interpretation, is then write down current system time Tn for not and is describedly waited to send out a medium bag and record tn constantly;
Be judged as under the situation not, calculate current system time and send difference between the system time of first medium bag, that is, and DeltaT=Tn-T0 and calculate and describedly wait to send out the medium bag and record constantly and record difference constantly with the medium bag of described first transmission, that is Deltat=tn-t0;
Whether judge Deltat greater than DeltaT, if the judgment is Yes, then sleep the Deltat-DeltaT time;
Under the situation of the medium bag that is judged as described first transmission, send described first medium bag, and judging that DeltaT equals under the situation of Deltat, send a described medium bag for the treatment of, and after arriving the described length of one's sleep, send the described medium bag of waiting to send out.
12. method according to claim 11 is characterized in that, described method further comprises:
Read described wait to send out the medium bag before, judge in the described ASCII stream file ASCII whether be empty, being judged as under the situation not, read the data in the described ASCII stream file ASCII, be judged as under the situation that is end operation.
13. method according to claim 11 is characterized in that, described method further comprises:
After the medium bag that to read one section described time span be T is put into described transmission buffering area, whether the medium bag time period of judging described transmission buffering area is less than described transmission buffering area preset time section t, if the judgment is Yes, then continue to read the medium bag that a period of time length is T.
14. a code stream is recorded and reconstructing apparatus, is used for the audio-video frequency media code stream that recording audio/video medium code stream and reconstruction are recorded, and it is characterized in that described equipment comprises:
At least one receiving port, be respectively applied for different suitable code streams in the receiving media bag, wherein, the form of described medium bag comprises that real-time video transportation protocol stream, real-time video transmission control protocol stream, audio frequency real time transport protocol stream, audio frequency transmit control protocol stream in real time;
Record cell is used for recorder recording constantly to described medium bag;
Memory cell is used for storing described medium bag constantly according to described the recording of described recording unit records;
Read module, being used for reading a period of time length from the ASCII stream file ASCII of having recorded is that the medium bag of T is put into the transmission buffering area, and takes out one from described transmission buffering area and wait to send out a medium bag;
First judge module, be used for judging and describedly treat whether a medium bag is the medium bag of first transmission according to the described recording time of waiting to send out the medium bag, if the judgment is Yes, then register system constantly T0 and described first medium bag record t0 constantly, if interpretation, is then write down current system time Tn for not and is describedly waited to send out a medium bag and record tn constantly;
Computing module, the judged result that is used at described first judge module is under the situation not, calculate current system time and send difference between the system time of first medium bag, promptly, DeltaT=Tn-T0 and calculate and describedly wait to send out recording constantly of medium bag and record difference constantly with the medium bag of described first transmission, that is Deltat=tn-t0;
Whether second judge module is used to judge Deltat greater than DeltaT, and if the judgment is Yes, then described code stream is recorded and reconstructing apparatus is set to sleep the Deltat-DeltaT time;
Sending module is used to send the described medium bag of waiting to send out.
CNA2008101114381A 2008-06-12 2008-06-12 Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream Pending CN101286993A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008101114381A CN101286993A (en) 2008-06-12 2008-06-12 Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008101114381A CN101286993A (en) 2008-06-12 2008-06-12 Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream

Publications (1)

Publication Number Publication Date
CN101286993A true CN101286993A (en) 2008-10-15

Family

ID=40058960

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008101114381A Pending CN101286993A (en) 2008-06-12 2008-06-12 Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream

Country Status (1)

Country Link
CN (1) CN101286993A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984622A (en) * 2010-11-01 2011-03-09 福建升腾资讯有限公司 Real-time transport protocol based bidirectional voice frequency mapping system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101984622A (en) * 2010-11-01 2011-03-09 福建升腾资讯有限公司 Real-time transport protocol based bidirectional voice frequency mapping system and method
CN101984622B (en) * 2010-11-01 2013-04-17 福建升腾资讯有限公司 Real-time transport protocol based bidirectional voice frequency mapping method

Similar Documents

Publication Publication Date Title
CN101675435B (en) Media stream recording into a reception hint track of a multimedia container file
TWI446773B (en) Apparatus and method for storing and reading a file having a media data container and a metadata container
CN104333796B (en) Image recording/reproducing device and file management method
CN101917613B (en) Acquiring and coding service system of streaming media
US9521469B2 (en) Carriage of quality information of content in media formats
CN103210642B (en) Occur during expression switching, to transmit the method for the scalable HTTP streams for reproducing naturally during HTTP streamings
US8572670B2 (en) Video distribution device, video distribution system, and video distribution method
WO2008061416A1 (en) A method and a system for supporting media data of various coding formats
US20080019440A1 (en) Apparatus and method for transmitting and receiving moving pictures using near field communication
CN101924742B (en) Media transmission method and equipment, and media storage method and equipment
US8499058B2 (en) File transfer system and file transfer method
US7555009B2 (en) Data processing method and apparatus, and data distribution method and information processing apparatus
CN101115011A (en) Stream media playback method, device and system
WO2019149053A1 (en) Data transmission method based on fusion transmission system
CA2739118A1 (en) Reconstruction of errored media streams in a communication system
CN1976477B (en) Mobile multi-media broadcasting data transmitting method
CN101217553A (en) A media flow random access treatment method
CN1138801A (en) Method and apparatus for conditioning and transporting timed program data, independent of transport timing
CN101754024B (en) Multiplexing device and multiplexing method
CN103873804A (en) Video replay time axis and content synchronous control method for embedded NVR
CN101286993A (en) Method and apparatus for recording and reconstructing code stream, apparatus for recording and reconstructing code stream
CN100579080C (en) The method and system of information playback in a kind of instant messaging
US7530089B1 (en) System and method for improving video quality using a constant bit rate data stream
CN101212413A (en) Mobile multimedia broadcast data transmission method
CN207869264U (en) A kind of law enforcement record 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
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20081015