This application is based upon and claims the benefit of priority from prior Japanese Patent Application No. 2004-161426, filed May 31, 2004, the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to an information recording device adapted to reencode the transport stream (TS) in a received digital broadcast and record the reencoded TS on a recording medium.
2. Description of the Related Art
In digital broadcasting, MPEG-2 encoded video information and MPEG-2 encoded audio information are packetized and multiplexed with other data for transmission by the MPEG-2 system. The MPEG-2 system is a standard for transmitting MPEG-2 encoded data in multiplexed form and is defined in ISO/IEC 13818-1.
Coded video and audio information is referred to as an elementary stream (ES), which is packetized in significant units: frame units for video and block units for audio. A packetized version of the ES is called a packetized elementary stream (PES). The PES contains time information. Video and audio can be synchronized using the time information. A multiplex signal form in which PESs are simply arranged with a header is called a program stream (PS). The PS is used in transmitting or storing only one program in an error-free environment, such as a DVD.
In the case of transmission such as broadcasting, transmission paths contain errors. Therefore, coded video and audio are multiplexed in a multiplex signal form called a transport stream (TS). The TS is composed of successive TS packets. Each TS packet is obtained by dividing a PES and has a length of 188 bytes including a 32-bit header. Each TS packet contains 13-bit information called a packet identifier (PID). The PID indicates what the corresponding TS packet transmits. The video TS and the audio TS have different PIDs, allowing the TS receiving end to restore received TS to the original PES using PIDs.
A method for recording a digital broadcast is to record the TS in the digital broadcast as it is, which allows recording with the same quality as that of the broadcast. In this case, however, the amount of data required for recording depends on the stream rate of the broadcast and is large. In order to record a long-duration program or many programs, a large-capacity recording medium is required. Therefore, the price of the recording equipment cannot be kept down.
A method for recording a long-duration digital broadcast on a recording medium of limited recording capacity is one which involves decoding the TS in the digital broadcast, then reencoding the TS using an MPEG encoder and recording the resulting reencoded stream (Japanese Unexamined Patent Publication No. 2002-118825). In this case, the rate of the recorded stream can be controlled by the setting rate in the MPEG encoder. For lengthy recording, encoding at a lower rate will require a smaller recording capacity.
When a stream obtained by reencoding the TS in a digital broadcast is recorded as described above, the quality of recorded video or audio will become poorer than that of the broadcast.
Recent DVD recorders allow a broadcast which is being reservation-recorded to be reproduced and viewed from the beginning. In order to reproduce a broadcast program while it is being recorded, two decoders are required for each of the video and audio, increasing the cost of the recording device.
In the present invention, to allow long-duration recording of a digital broadcast, the digital broadcast is reencoded and video and audio signals are remultiplexed and then recorded. In this case, only the video signal is reencoded and the audio signal is recorded asreceived (asbroadcast).
To remultiplex the reencoded video and the original (as-received) audio, it is necessary to rewrite the PTS of the original audio TS packets. At this time, the difference in STC between a video encoder and a video decoder is used as the difference between the original PTS and the new PTS. In addition, to remultiplex the reencoded video and the original audio, buffer control is used.
The present invention allows the TS of a digital broadcast to be recorded with the amount of data of the TS reduced without using an audio decoder and degrading the quality of audio information.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention, and together with the general description given above and the detailed description of the embodiments given below, serve to explain the principles of the invention.
The embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Before describing a recording device, a TS, PES and ES will be described.
The elementary stream (ES) is a code string obtained by encoding video information in frame units with compression. The packetized elementary stream (PES) is one obtained by dividing each frame of the ES into packets and appending a PES header to the top of the packets. The MPEG-2 standards do not specify any division unit for transforming the ES into a PES. Assuming that the TS is broadcast with data inserted in it, the ES is divided in frame units according to broadcasting standards and transformed into the PES. The PES header contains a presentation time stamp (PTS) which is time information for outputting the corresponding frame and a decoding time stamp (DTS) which is time information for decoding the corresponding frame. A packet in which a PES header is appended to one frame of ES is referred to as a PES packet.
The TS is composed of TS packets each of a fixed length of 188 bytes and used in real-time transmission and communication systems including digital broadcasting. Each TS packet has a header having a fixed length of four bytes and the remaining portion of 184 bytes is composed of a variable-length adaptation field and a payload. Each payload stores a division of a PES packet.
As shown in
One PES packet is divided into payloads of TS packets having the same PID. Thus, one TS packet will never contain information from two or more PES packets. When a certain program is composed of a video coded stream and an audio coded stream, both the streams are multiplexed with a TS packet having a unique PID as a unit. In addition to such media multiplexing, the TS has a function of multiplexing two or more programs.
In order to indicate what information packets of the same PID actually possess, identification information is required. To describe a relationship between PIDs and TS contents, the TS is transmitted with table information, called program specific information (PSI), stored in payloads. The PSI contains a program map table (PMI) indicating the PIDs of two or more streams constituting a program, a program association table (PAT) indicating the correspondence between the program number and the PMT, and a conditional access table (CAT) indication limited receiving information. The PMI can contain explanatory information for programs or streams constituting the program in units of finer sections or descriptors. In digital broadcasting, use can be made of a table, such as a network information table (NIT), to perform the function of an electronic program guide (EPG) or receive TS on a desired channel.
Information caused to contain program information by expanding PSI information is service information (SI). Program names and a program guide (EPG) are transmitted via the SI. In many cases, the SI is regarded as part of the PSI and hence handled collectively as PSI/SI information. In addition, since the SI contains almost all of the EPG, it is often handled collectively as SI/EPG.
Next, the TS recording method of the recording device of the present invention will be described.
The TS transmitted from a broadcasting station as shown in
In general, the rate of audio is very low in comparison with the rate of video. Thus, reencoding (compression) of only video allows long recording of a digital broadcast at a low rate. With reencoding of video only, the quality of audio can be maintained at the same level as that of the broadcast, eliminating the need of a relatively expensive audio encoder for Dolby AC-3 or 5.1-ch surround.
The TS selected by a tuner 11 is input to a demultiplexer unit (hereinafter referred to as a demux unit) 1. The demux unit 1 separates the input TS of a digital broadcast into video and audio. The separated video and audio are sent to a video decoder and an audio decoder, respectively, with conversion into the PES form shown in
The video decoder 2 and the audio decoder 3 decode the video PES and the audio PES, respectively. The resulting video and audio signals are sent to an MPEG encoder 4. Although the audio decoder 3 is provided herein for convenience of illustration, it may be omitted. Alternatively, the audio may be applied to the MPEG encoder 4 as silent data (null packets).
The MPEG encoder 4 MPEG-TS encodes the input video and audio signals, The TS packets (having MPEG compressed data) obtained through encoding are then sent to a remultiplexer unit (hereinafter referred to as a remux unit) 5.
The remux unit 5 replaces the input audio TS packets from the MPEG encoder 4 with the audio TS packets stored in the buffer 5. Thereby, a TS is obtained in which video information output from the MPEG encoder 4 and as-broadcast audio information have been remultiplexed. The resulting TS is recorded on a recording medium such as a hard disk. To remultiplex audio, the audio rate in the encoder 4 is set higher than the original audio rate.
In remultiplexing the audio TS packets from the buffer 6 in the remux unit 5 of
Consider here that MPEG-encoded audio is decoded and then reencoded with the same encode setting (the same data rate). In this case, audio of one access unit is obtained from audio of one access unit. This process is schematically illustrated in
Suppose that the PTS of an access unit prior to recording (audio PES obtained from TS transmitted from a broadcasting station) is PTS ori and the PTS of the access unit after reencoding is PTS enc. Further, suppose that the time when the access unit is input to the decoder 3 is t0, the time it is output from the decoder 3 is t1, the time it is input to the encoder 4 is t2, and the time it is output from the encoder 4 is t3. Furthermore, suppose that the PTS of the access unit output from the encoder 4 is PTS enc. Then, the time t4 the access unit from the encoder 4 is output from a virtual decoder 17 is PTS enc.
Since the STC of the decoder 3 coincides with PTS ori at time t1, the PTS ori and PTS enc are related by
PTS enc=PTS ori+STC diff+(t4−t1)
where STC diff is the difference in STC between the decoder and the encoder.
Although (t4−t1) varies according to the characteristics of the encoder and the setting rate, it may be considered as constant so long as encoding is performed at the same setting rate. That is, it is possible to examine the value of (T4−t1) in advance through experiment.
When audio temporarily stored in the buffer 6 is remultiplexed in the remux unit 5, the PTS of the temporarily stored audio is rewritten assuming that the audio to be multiplexed has been reencoded through the decoder and the encoder. That is, supposing that the original PTS is PTS old and the difference in STC between the decoder 3 and the encoder 4 is STC diff, the new PTS, PTS new, becomes
PTS new=PTS old+STC diff+Td (1)
Td in equation (1), which corresponds to (t4−t1) in the above equation, is a delay time dependent on the setting rate of the encoder. As Td use is made of a value corresponding to the setting rate of the encoder.
Next, consider the capacity required for the audio buffer 6 in
Consider here the time T1 of commencing the remultiplexing. (T1−T0) is the time during which audio is stored and corresponds to the time required by decoding and encoding, i.e., (t3−t0) in
T1=T0+Td (2)
where Td is identical to that in equation (1).
That is, the capacity B of the buffer used to temporarily store audio must be greater than original audio rate×delay time Td.
Hereinafter, an embodiment of a recording operation of the present invention will be described in detail.
The PAT stores a list of services carried out in a certain TS in the form of a list of PIDs in a PMT each indicating a service. The PID of the PAT is always fixed at zero. The PMT stores PIDs of images and audio contained in a certain service. If PIDs of images and audio can be obtained from the PMT, original moving images can be reproduced by collecting packets having these PIDs.
In the processing prior to the start of recording, the processes carried out by the main CPU 10 on the demux unit 1 are as follows:
Next, the processes carried out by the main CPU to create PMT to be inserted are as follows:
In step D01, a TS packet is obtained from TS in a received digital broadcast.
In step D02, a decision is made on the basis of the PID described in the TS packet header as to whether or not the TS packet is an audio packet.
In steps D03 and D04, the time T0 when the temporary storage of the audio packet was commenced is retained. The time is employed later in the remux unit.
In step D05, the audio packet acquired is stored into the buffer 6.
In step D06, each of the video, audio and section (PAT, PMT) packets is sent to a corresponding processing unit.
In step R01, a TS packet is acquired from TS received from the encoder 4.
In steps R02 to R94, remultiplexing is started after a delay of Td from the time T0 the temporal storage of audio packet was commenced. Packets acquired prior to the commencement of remultiplexing are discarded.
In step R05, the packet type is judged from the PID described in the header of the TS packet. When the TS packet corresponds to audio, null, or PMT, remultiplexing is performed. To remultiplex audio, it is required to change PMT information. For this reason, no encoder-created PMT is used.
In steps R06 and R07, the amount of data stored in the buffer 6 when remultiplexing of audio was commenced (T1 of
In step R08, if the amount of stored data in the buffer 6 is larger than B (YES), then audio is remultiplexed in step R09; otherwise, the flow goes to step R12 without remultiplexing audio.
In steps R09 to R11, the audio packet temporarily stored in the buffer 6 is acquired (audio packets acquired from the encoder 4 are discarded), and the audio packet is recorded on the recording medium 7 with the PTS rewritten.
Step R10 will be described in detail here. In step R10, the payload unit start indicator in the header of an audio TS packet obtained from the buffer is checked first. If the value of the payload unit start indicator is 1, a PES header (PTS) is contained in the payload of that TS packet as with the TS packet TS1 of
If the value of the payload unit start indicator is 0, no PES header (PTS) is contained in the payload of that TS packet as with the TS packet TS2 of
In step R12, a decision is made as to whether or not it is time to insert PMT. The PMT needs to be inserted at intervals of less than 100 ms according to the MPEG standards.
In step R13, the PMT corresponding to the remultiplexed audio TS packet is recorded on the recording medium. Step R13 is subdivided into 3a through 3d:
In step R14, a null packet is inserted in place of audio and PMT.
In step R15, when the TS packet is not an audio packet, a null packet, or PMT (that is, when the TS packet from the encoder 4 is a video packet in step R05), the video packet is recorded on the recording medium 7 as it is.
The encoder 4 encodes a video signal from the video decoder 2 and then outputs video TS packets and null packets (silence) as audio TS packets. The TS packets from the remux unit 5 are recorded on the recording medium (hard disk) 7.
A demux unit 12 separates video and audio (null packets) read from the HDD 7 and supplies the video packets and the audio packets to a video decoder 13 and an audio decoder 15, respectively. A digital-to-analog converter 14 converts a digital video signal from the video decoder 13 to output an analog video signal. A digital-to-analog converter 16 converts a digital audio signal from the audio decoder 15 to output an analog audio signal.
The second embodiment allows a broadcast program which is under reservation recording by way of example to be reproduced and viewed from the beginning. In such a case, although two audio decoders have been required heretofore, the second embodiment requires only one audio decoder.
Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2004-161426 | May 2004 | JP | national |