Abstract:
A system and method for merging of multiple encoded audio and video streams into a single program in the transport stream enables playback of any audio stream with any video stream. This is accomplished by first locking the frequency of audio and video input streams for a plurality of different programs to a source clock, independently encoding each program with its own PCR and PTS into a program stream, multiplexing the program streams into a transport stream, and then synchronizing the PCR and PTS of the program streams to a declared master PCR.

Description:
BACKGROUND OF THE INVENTION  
       [0001]     1. Field of the Invention  
         [0002]     This invention relates to the transmission of entertainment programming, and more specifically to the merging of multiple encoded audio and video streams into a single program in the transport stream to enable playback of any audio stream with any video stream.  
         [0003]     2. Description of the Related Art  
         [0004]     Television programs are distributed to viewers by a variety of broadcasting methods. These methods include traditional analog broadcast television (National Television Systems Committee or “NTSC” standard), the digital broadcast television “Advanced Television Systems Committee or “ATSC” standard), cable television (both analog and digital), satellite broadcasting (both analog and digital), as well as other methods. These methods allow audio and video streams for television programming to be encoded multiplexed into a transport stream that is transmitted over a common transmission medium.  
         [0005]     As shown in  FIG. 1 , the “headend”  10  of a satellite broadcast system  12  includes among other functions a traffic &amp; scheduling center  14 , a satellite broadcast center  16  and a conditional access management center (CAMC)  18 . The broadcast center encodes, encrypts and multiplexes programming content, either stored or from live feeds  20 , into a packetized transport stream  22  that is uplinked to satellites  24  via an antenna  26 .  
         [0006]     To view a television program on a TV  28 , a subscriber may have to subscribe to a service package offered by a pay-TV service/transmission provider such as a direct broadcast satellite (DBS) operator (e.g., DIRECTV) or a cable company. Such a pay-TV service provider may require a subscriber to utilize an integrated receiver decoder (IRD)  30  that enables the descrambling or decryption of the transmission downloaded from an antenna  32 . The IRD may be configured to allow the viewing of one or more particular channels, programs, etc. based on a subscriber&#39;s payment or subscription.  
         [0007]     As shown in  FIG. 2 , a typical MPEG packet  40  in the transport stream is of a fixed length, 188 bytes for standard DVB, of which the first 4 bytes contain header information  42  and the remainder is payload  44 . The header includes among other things a sync byte “0×47”, a payload_unit_start flag, the program ID (PID), and an adaptation_field_control flag. The PID is a number. The program guide defines what (audio, video, conditional access table, etc.) is on a given PID. If the adaptation_field_control flags are set, the packet contains an adaptation field and may contain a program clock reference (PCR) for the associated data stream. Traditionally, the PCR appears on the video stream but may appear on both audio and video or on a separate PID. If the payload_unit_start flag is high, the packet contains a PES header, which may contain a presentation time stamp (PTS). Each program including a video stream and/or one or more audio streams has an associated PCR that establishes its clock. The PTS is included in both the audio and video streams and tells the IRD at what time relative to the PCR to play the stream. The PES header may also include a decoder time stamp (DTS) that suggests when the decoder should start decoding to achieve the PTS. For complete description of the packet structure and transport stream see ISO/IEC 13818-1.  
         [0008]     As shown in  FIG. 3 , the 1 st  generation MPEG encoders  50  utilized by DirecTV and produced by Compression Labs, Inc. (CLI) took synchronized audio/video (A/V) inputs  52  from various sources such that all sources had exactly the same frequency. Frame synchronization was typically accomplished by feeding a reference signal  54  along with the A/V inputs  52  to a frame synchronizer  56 . Thereafter each program was encoded and multiplexed together. The Mux  58  had one 27 MHz MPEG clock reference  59  locked to a reference input video through either the sync pulses in analog video or a serial digital video in. A counter in clock reference  59  derived the PCR for each encoded codestream from that one clock. As a result, all of the programs were in sync with both the “frame” and “clock”. However, because CLI&#39;s common MPEG clock approach required that all the inputs be synchronized and all the encoders are collocated with the Mux in a card cage it was not well accepted by customers and the approach was abandoned by the industry.  
         [0009]     Current generation manufacturers such as Divicom, Thomson, and Motorola now produce MPEG Encoder/Program Mux boxes  60  that operate independently of one another as shown in  FIG. 4  to encode a video and one or more audio inputs. Each box includes a separate MPEG clock reference  61  that is locked to the input video to generate a multiplexed program stream  62  with unique PCR and PTS time stamps. A counter simply counts tics of the clock reference to generate the time stamps. The PCR has an “epoch” or beginning of time where the counter is set to zero and then rolls over some time later, e.g. every 36 hours. The counters in different encoder boxes will have different epochs, and thus will not be encoder synchronized. A provider can use distinct encoder boxes for different (non-synced) sources of programming and a Mux  64  to multiplex the program streams together into the transport stream  22 . A transport stream in which the programs are referenced off of different and independent PCRs supports normal “channel surfing” and does not have the constraints associated with frame and clock synchronization.  
       SUMMARY OF THE INVENTION  
       [0010]     The present invention provides a system and method for merging of multiple encoded audio and video streams into a single program in the transport stream to enable playback of any audio stream with any video stream.  
         [0011]     This is accomplished by first locking the frequency of audio and video input streams for a plurality of different programs to a source clock, independently encoding each program with its own PCR and PTS into a program stream, multiplexing the program streams into a transport stream, and then synchronizing the PCR and PTS of the program streams to a declared master PCR. The A/V streams can be frequency locked either by using frame synchronization or by providing a common source clock. The PCRs are synchronized by declaring one program and its PCR to be the master and comparing each slave PCR value to an interpolated value of the master PCR. The slave PCR is set to the interpolated value and the offset added to each occurrence of the PTS (or DTS). The offset may be time averaged to improve resolution in high jitter encoders. This approach can be used with currently existing 2 nd  generation hardware to enable playback of an audio stream from one program and encoder box with a video stream from another program and encoder box. Although this approach does require frequency locking of the input streams, it does not require a single encoder reference clock nor does it require collocation of the encoder boxes.  
         [0012]     These and other features and advantages of the invention will be apparent to those skilled in the art from the following detailed description of preferred embodiments, taken together with the accompanying drawings, in which: 
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0013]      FIG. 1 , as described above, is a simplified block diagram of a satellite broadcast system;  
         [0014]      FIG. 2 , as described above, is a diagram of an MPEG packet structure;  
         [0015]      FIG. 3 , as described above, is a block diagram of a 1 st  generation MPEG encoder that encodes and multiplexes multiple audio and video streams into a transport stream using a single MPEG reference clock to generate the PCR and PTS;  
         [0016]      FIG. 4 , as described above, is a block diagram of a plurality of 2 nd  generation MPEG encoders that operate independently including separate MPEG reference clocks to generate program streams with unique PCR and PTS that are multiplexed into the transport stream;  
         [0017]      FIG. 5  is a block diagram of a system in accordance with the present invention for use with independently operated A/V encoders to merge the streams into one program with source clock frequency locked and encoder clock synchronized;  
         [0018]      FIG. 6  is a diagram of a transport stream including multiple audio-video streams and their PCR and PTS;  
         [0019]      FIG. 7  is a flowchart of the process for synchronizing the encoder clocks;  
         [0020]      FIG. 8  is a diagram of the transport stream in which the audio-video streams have been synchronized to the encoder clock;  
         [0021]      FIG. 9  is a flowchart illustrating the process of decoding the transport stream to playback video from one program with the audio from another program; and  
         [0022]      FIG. 10  is a block diagram for event programming providing enhanced video feeds in addition to the normal program feed from which a customer may select. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0023]     Satellite and cable providers continue to expand television programming to include some special events such as NASCAR, NFL, concerts, etc. that include multiple video and audio inputs. In a NASCAR event, the view from the announcer, pit crew, driver and field and audio of the announcer, pit boss, driver and crowd may be available. Typically, the director cuts the various audio and video feeds to create the program that is broadcast. Using currently available technology, the A/V inputs could be made available to a consumer in assigned pairs as different programs. For example, the view from the car and driver commentary would be one program, the view from the pit and pit boss commentary would be a second program, and the director&#39;s cut of the available audio and video inputs would be the broadcast program. Each of these A/V inputs would be a separate program allowing the consumer to simply surf from one channel to the next. Neither frequency locking nor clock synchronization is required.  
         [0024]     However, in some programming it may be desirable to provide the consumer with the flexibility to mix and match the audio and video inputs, permitting the viewer to be his or her own director. For example, the consumer could select the “view from the car” &amp; “pit boss commentary”. In order to do this, all of the sources must be both “source clock frequency locked” and “encoder (MPEG PCR) clock synced”. Otherwise the consumer IRD cannot reliably decode and display the selected audio and video streams at the proper times. The variation in frame frequency may cause the audio and video streams from different programs to drift apart and could cause overflow or underflow in the buffer. A discrepancy in the PCR would cause the IRD to try to buffer the audio to play at the wrong time.  
         [0025]     The currently installed encoder systems do not provide this type of synchronization. Notably, the original CLI hardware could be used to provide this mix and match capability. However, as noted above CLI&#39;s common MPEG clock approach was not well accepted by customers and was abandoned by the industry. Furthermore such an approach is not compatible with the existing installed hardware.  
         [0026]     As shown in  FIGS. 5-9 , the existing hardware platform includes a number of encoder/program multiplexers  70 , each having its own clock reference  72  taken from the video input, and a transport Mux  74 . As described previously, each encoder encodes its audio and video inputs and generates a program stream  76  that includes a PCR and PTS for each input. The transport Mux  74  multiplexes the program streams into a transport stream  78  for transmission via antenna, cable or satellite  79 .  
         [0027]     The current invention builds on the existing hardware platform to frequency lock and clock synchronize the program streams  76  to effectively merge them into a single program in the transport stream  78 . This allows a consumer, and the existing base of installed IRDs, to mix and match audio and video streams as if they were encoded using a single N-input encoder/transport Mux.  
         [0028]     The audio and video streams can be source clock frequency locked in one of two ways. As shown in  FIG. 5 , the unlocked audio and video streams  80  for each program are input to a frequency locker  82  together with a common reference signal  84 , e.g. a 27 MHz clock. Using techniques well known in the industry such as a synchronizer (Grass Valley Group Inc Gecko® series, Ensemble Designs Signal Acquisition Series® and Leitch Inc DPS® series), the locker locks the frequency of all the inputs to the reference signal. Note, the frequency locker may, and typically does, provide video phase locking as well, in which case the operation is referred to as “frame synchronization”. Alternately, as shown in  FIG. 10 , the inputs can be frequency locked by referencing video capture, e.g. the cameras, off of a common source clock.  
         [0029]      FIG. 6  illustrates a transport stream  78  containing at least two programs “X” and “Y”, each of which are time stamped with PCR and PTS values in the payload of packets  90  for a video and audio input. For purposes of illustration only, a transport rate of 40,608,000 bits/sec and 27,000 packets/sec is used. This equates to 1,000 27 MHz ticks/packet. Note, 1,000,000 ticks represents only approximately 0.037 seconds in this example. In general, the PCR leads the PTS by a sufficient amount of time (clock ticks) to allow the IRD to extract, decrypt and decode the selected audio and video streams for playback at the designated PTS. Although the PTSs (PTS X-V and PTS X-A) for the video frame and audio segment are typically close together they are typically not the same. The playback of the audio will not generally be precisely aligned with the presentation of the video frame.  
         [0030]     In this example, the first PCR for program X has a value of 1,000,000 ticks and the PTS for the video and audio streams are 2,000,000 and 1,901,000, respectively. The first PCR for program Y has a value of 10,000,000 ticks due to the different epochs in the separate encoders and the PTS for the video and audio streams are 12,000,000 and 11,860,000, respectively.  
         [0031]     To synchronize these program streams to the encoder clock, an encoder clock synchronizer  100  synchronizes the programs&#39; PCR and PTS values in the transport stream off of a declared master PCR in one of the program streams to merge them into one program. As illustrated in  FIG. 7 , the encoder clock synchronizer declares one program (program X) and its PCR to be the master (step  110 ). The synchronizer compares each slave (program Y) PCR value to an interpolated value of the master PCR and computes and stores the offset (step  112 ). The slave PCR is set to the interpolated value (step  114 ) and the offset added to each occurrence of the PTS (or DTS) (step  116 ).  
         [0032]     The synchronizer suitably processes the transport stream time sequentially a packet at a time. For example, the synchronizer will read a packet header and determine that the master PCR-X is included in the payload. The synchronizer reads and stores the PCR value e.g., 1,000,000 and then counts the number of packets until a next PCR or PTS is detected. In this case, the next time stamps are the PTS X-V (video) and PTS X-A (audio) values, which remain unchanged at 2,000,000 and 1,901,000 respectively. The synchronizer next encounters PCR Y four packets away from PCR X. The interpolated value for program X is 1,000,000+4 packets * 1,000 ticks/packet or 1,004,000 tics as shown in  FIG. 8 . The current offset is 1,004,000-10,000,000 or −8,996,000 tics. The synchronizer then detects the PTS Y-V and PTS Y-A values to which it adds the offset to get values of 3,004,000 and 2,864,000 respectively, which are now referenced to the master PCR. This process is repeated for each slave program with each being referenced against the master as it is encountered time sequentially. Alternately, given sufficient memory, the data can be processed on a program-by-program basis instead of sequentially. Regardless, the result is a single master PCR against which the PTS for all the audio and video streams are referenced.  
         [0033]     The offset may be time averaged to improve resolution (step  118 ). The clock should advance at the exact consistent rate of 27,000,000 ticks per second. This is generally true, however, some manufacturers only keep to the 27 mega ticks per second rate as a long term average and in the short term, the PCR might vary a few thousand ticks variation from sample to sample. This is called PCR jitter. MPEG has a specification that permits PCR jitter to upwards to two seconds, however in practice; IRDs will not tolerate much jitter. By averaging the difference it makes it so the jitter from the main channel does not increase the jitter on the slave channel. Consequently, doing averaging is only important to make things work with ‘brand X’ encoders. This step is not at all necessary for properly designed low jitter encoders. The window size was selected to be approximately one second to match the behavior of ‘brand X’ encoders, however given a worse case MPEG encoder the window might go as high as two seconds. The typical value of the window size is zero, since most encoders are relatively jitter free PCRs. If a discontinuity is detected between the average and the current value of the offset, the time averaged offset is reset to the current offset (step  120 ). This may occur if, for example, an encoder is taken off-line and replaced with another encoder having a different EPOC.  
         [0034]     As illustrated in  FIG. 9 , the source clock frequency locked and encoder clock synchronized transport stream enables a customer to select the video stream from one program (Program X video) and the audio stream from another program (Program Y video) and play them back together as if they were encoded by the same encoder. Using the remote, the customer would view the program guide and select a desired channel (step  122 ). The program guide might, for example, list channel  800  “NASCAR Broadcast”, channel  801  “car video, pit audio”, channel  802  “pit video, car audio”, etc. where a channel has been assigned to each of the supported combinations of audio and video. Thereafter, the IRD extracts PID numbers for the selected audio and video, and PCR if it is on a separate PID (step  123 ). The IRD “PID filters” the transport stream (step  124 ) to extract the selected audio and video streams, and PCR if separate. The IRD locks its internal clock to the PCR by loading the next PCR value into its counter and continuing to count (step  125 ). The IRD decrypts the audio and video streams (step  126 ). The IRD decodes the audio and video streams (step  127 ) and stores the data in respective buffers. A display processor monitors the PCR via the internal counter and the PTSs (step  128 ) and outputs the audio and video to the playback device(s) (step  129 ). The IRD continually loads the next PCR value into its counter and the process is repeated until the customer changes channels. At that point, the IRD extracts different audio and video streams and continues on. The described procedure is a simplified version of IRD operation to illustrate the relevant steps. Not all IRDs function in exactly the same manner but do embody the procedure for extracting the PCR and PTS and playing back the desired audio and video.  
         [0035]     In the current example, the customer selects a channel corresponding to Program X video and Program Y audio. The IRD extracts the corresponding PID numbers and filters transport stream to extract only those packets. The IRD extracts a PCR value of 1,000,000 and loads it into its 27 MHz counter. The IRD decrypts and then decodes only the Program X video frame and Program Y audio segment and stores the data in a buffer. The IRD monitors the PCR via its internal counter and when it reaches 2,000,000 outputs the Program X video frame. Similarly when the counter reaches 2,864,000, the IRD outputs Program Y audio segment.  
         [0036]     In an alternate embodiment, a customer may select more than one video stream and/or more than one audio stream for concurrent playback. For example, two or more videos may be simultaneously displayed using a picture-in-picture or montage functionality. A customer may select a primary audio stream for normal playback and a secondary audio stream that is intermittently played over the normal audio. Alternately, different audio streams could be directed to different speakers.  
         [0037]     As mentioned previously this process can be applied to any programming content to provide a master PCR against which all the PTS are referenced. However, the process is particularly applicable to “live” event programming in which a director receives multiple “frame synced” feeds that he/she ordinarily cuts back &amp; forth to mix and match the audio and video feeds to produce the one broadcast feed that a consumer ordinarily watches. As a result, the enhanced A/V feeds can be processed and delivered to consumers that have the proper subscriptions and hardware.  
         [0038]      FIG. 10  illustrates a possible configuration for a live NASCAR race to provide both the normal program feed  130  and enhanced A/V feeds  132 . In this example, four different cameras  134  (car, pit, field and announcer) capture audio and video. The cameras are all referenced off a common source clock  136  and thus are frame synchronized. All of the audio and video feeds are routed to a director&#39;s audio switch  138  and a director&#39;s video switch  140 , respectively. The director uses the switches to mix and match the different audio and video feeds to create the normal program feed  130 . The car and pit feeds are separately provided as enhanced A/V feeds  132 . The various feeds are input to encoder/program multiplexers  142  to generate respective program feeds having independent PCR and PTS as described previously. A transport multiplexer  144  multiplexes the program feeds to generate a transport stream  146 . An encoder clock synchronizer  148  synchronizes the programs&#39; PCR and PTS values in the transport stream off of a declared master PCR in one of the program streams to merge them into one program. As a result, a normal customer can receive and watch the normal program feed. A customer who has subscribed to the special event can access the enhanced A/V fees and act as his or her own director to mix and match all of the audio and video feeds as desired.  
         [0039]     While several illustrative embodiments of the invention have been shown and described, numerous variations and alternate embodiments will occur to those skilled in the art. Such variations and alternate embodiments are contemplated, and can be made without departing from the spirit and scope of the invention as defined in the appended claims.