The present invention relates to video compression, and more particularly to a simple method for demultiplexing a statistically multiplexed MPEG transport stream (MPTS) into constant bit rate (CBR) single program transport streams (SPTSs) without making any changes to the video elementary streams.
The video elementary streams in the MPTS are all typically encoded with a variable bit rate (VBR). If the desired constant bit rate is too low, for instance if the constant bit rate of the CBR stream is less than the average bit rate of the VBR stream, it becomes impossible to demultiplex a single stream from the MPTS without modifying the video elementary stream. Even in this case however, it is usually possible to reduce the potential for visual artifacts by replacing B-type pictures with null B-type pictures.
Prior efforts that achieve the demultiplexing of a statistically multiplexed MPTS into multiple CBR SPTSs do so by modifying (transcoding) the video streams. This is a compute intensive process and can negatively impact the quality of the resultant video. Examples of such products are the CherryPicker 7000 video re-multiplexer from Terayon Communication Systems located in Santa Clara, Calif., United States of America and possibly the PS5030 Multiplexer Module from PixStream Incorporated located in Waterloo, Ontario, Canada.
In a statistically multiplexed MPTS, video streams are encoded as VBR with a wide distribution of bit rates per picture. The transport packets (TPs) for a given video stream arrive in almost as bursty a pattern, though there is some smoothing. What is desired is to fit a complete SPTS with VBR video and CBR audio within a CBR network connection without recoding or modifying the video in any way.
Accordingly the present invention provides a simple method for demultiplexing a statistically multiplexed MPEG transport stream into CBR single program transport streams without recoding or modifying the video in any way. The method starts sending a picture at a fixed interval, on the order of tens or hundreds of milliseconds, before it is to be decoded or as soon thereafter as possible. A separate logical smoothing buffer is used for each variable bit rate single program transport stream. When the decode time arrives the picture is transferred from the smoothing buffer for decoding. In the event there is buffer overflow, B-type frames are replaced with null B-type frames, which has the effect of a freeze frame by repeating the prior decoded picture, until the overflow condition ceases.
The objects, advantages and other novel features of the present invention are apparent from the following detailed description when read in conjunction with the appended claims and attached drawing.
Referring now to
Referring to
As shown in
Bufn represents the smoothing buffer for variable bit rate (VBR) video elementary stream n within a statistically multiplexed MPEG transport stream (MPTS). The variable tdn(j) is a decode time for the j'th picture of the video elementary stream n in a system target decoder. Decode time is measured in seconds and is with respect to a system clock PCR for the program containing elementary stream n. The variable tni(j) is a time at which the i'th transport stream (TS) packet of the j'th picture of elementary stream n enters the smoothing buffer Bufn. Again time is measured in seconds and is with respect to the system clock for the program containing elementary stream n. Rn is based on the desired bit rate shown in FIG. 2—it is the desired bit rate less the bit rate of the packets in the SPTS not carrying video. Rn is a constant rate at which the TS packets with the video elementary stream n enter the smoothing buffer Bufn. The rate is given in units of bits per second. Finally δn is the earliest time before the decode time that a video elementary stream TS packet can enter the smoothing buffer Bufn. Again time is given in seconds.
The buffer size is given by |Bufn|=Rnδn. TS packets containing video elementary stream n enter Bufn as early as possible subject to the following constraints:
The buffer model is satisfied if the buffer Bufn never overflows or underflows. An overflow occurs when for any picture j of video elementary stream n and any TS packet containing picture j, tni(j)>tdn(j).
In the event of overflow a B-type frame is replaced by a null B-type frame until the overflow ceases, which has the effect of repeating the prior video frame by the decoder.
The above is illustrated in
Thus the present invention provides for demultiplexing a statistically multiplexed MPEG transport stream into a constant bit rate single program transport stream using a smoothing buffer with the video pictures in the stream being loaded into the smoothing buffer at the desired constant bit rate as early as possible up to a fixed time interval before the pictures need to be decoded.
Number | Name | Date | Kind |
---|---|---|---|
5287182 | Haskell et al. | Feb 1994 | A |
5521922 | Fujinami et al. | May 1996 | A |
5534937 | Zhu et al. | Jul 1996 | A |
5566208 | Balakrishnan | Oct 1996 | A |
5847765 | Sanpei | Dec 1998 | A |
6052384 | Huang et al. | Apr 2000 | A |
6529552 | Tsai et al. | Mar 2003 | B1 |
Number | Date | Country |
---|---|---|
0692911 | Jan 1996 | EP |
2356323 | May 2001 | GB |
WO 9738532 | Oct 1997 | WO |
WO 0139505 | May 2001 | WO |