Sei sulla pagina 1di 12

Issue3January2007

CBCTECHNOLOGYREVIEW
www.cbc.radiocanada.ca

THEDOS&DONTSOFTRANSPORTSTREAMLEVEL NETWORKING

GuyBouchard SeniorManager, NewBroadcastTechnologies


ABSTRACT MPEG transport streams are making their way into broadcast and cable plants. A transport streamisadifferentvehiclethatcancarrymultipleprogramsinasinglecableorcarrier.This constitutes a new vehicle for programming material, and this new vehicle is opening up new possibilities.However,ithasitsownsetofrules,itsownenforcementtools,anditsownissues. Thispaperwillprovidethereaderwithenoughinformationtobringhimorheruptospeedon theMPEGtransportvehicle. INTRODUCTION Broadcastershaveusedseveraldifferentvehiclestocarrytheircontents.Theveryfirstonewas composite video. Component analog video was introduced in the 80s, with limited success. Component digital (SDI) was widely adopted by the broadcast community. All of these uncompressed video transport vehicles had their own set of rules (e.g., one video per stream, video equalization, maximum distance, minimum return loss requirement, and embedded audiosupport). The MPEG transport stream is the vehicle for compressed television signals. It is opening up new opportunities: reduced bandwidth, multiple services, drop & insert, and others. It also comeswithnewrules,includingMPEGcomplianceandtwodifferentsyntaxes. This article reviews a few MPEG transport concepts, then answers some frequently asked questionsaboutthesubject.

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

1/12

THEABCsOFMPEGTRANSPORT 1. SystemLayers LiketheOSImodelusedinthecomputernetworkingindustry,theMPEGcompressed signaliscarriedoverseverallayers: Thephysicallayer(cable,modulationandcoding). Thetransportlayer. Theapplicationlayer(DVB,ATSC) Mosttransportstreamsarecarriedonthefollowingphysicallayer: SMPTE310 o SMPTE310 relies on a coax transmission system based on a synchronous feedat19.39Mb/s. DVBASI o DVBASI relies on a coax transmission based on a subset of the SDI specifications. The signal is always transmitted at 270 Mb/s. However, a cleverstuffingprotocolpermitstransmissionfrom1to214Mb/s. IP o IP relies mostly on unshielded twistedpair (UTP or Cat5) cable. Transport streamsareencapsulatedin1388bytepacketscarriedmostlyasUDPtraffic. 2. TransportStream Atransportstream(TSorTP)isaformatspecifiedinMPEG2Part1,Systems(ISO/IEC standard138181).Itsdesigngoalistoallowmultiplexingofdigitalvideoandaudioand tosynchronizetheoutput. SERIALFORMAT MPEG datamust be serialized in order to be transmissible over cable or RF. The serialization processiscarriedoutaccordingtoastrictprotocolbasedonpacketbasedmultiplexing. Theencodermustfitalltheprogramelementsintothetransportstream: Audio Video Data

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

2/12

UnlikeIP,theMPEGtransportstreamreliesonfixedlengthpackets.Thelengthofastandard MPEGpacketis188bytes. 188 Bytes Thebesthumanscalemodelforadatapacketisatraincar. It carries a certain payload. In terms of data, it can be expressed as the number of bytes it carries. In the specific H e case of MPEG, the payload is 188 bytes. All bytes look the a Payload d same,soaheaderhastobeaddedtothepacketsothatthe e demultiplexercanknowwhatthedatapacketscontentsare r orwhatitsdestinationis. Figure1Transport 3. ProgramElementaryStream Apacketizedelementarystream(PES)isthuscreated
Figure2Packetizedelementarystream(PES)

Theprogramcomponentsare: Video,includingclosedcaptioning Audio Data Theelementscanbedifferentiatedinthestream,evenifallpacketslookthesame,viaahighly flexiblesetofindextablescalledMPEGtables. MPEGTABLES TheMPEGtablesareasfollows: Theprogramassociationtable(PAT),whichisthemotherofalltables.Itgivestheequipment thatreadstransportstreamsthefollowinginformation: ThetransportstreamID(anumberuniquetoeachtransportstreamthat identifiesitsorigin). Howmanyservicesarepresentinthestream. Thelocation(PIDnumber)ofeachserviceindextable(PMTs).

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

3/12

Theprogrammaptable(PMT),whichisanindextablethattellstheequipmentthatreadsthe transportstreamthelocation(PIDnumbers)ofeachservicecomponent: Video Audio(s) Data

DEFINITIONOFAPID APID,orprogramidentifier,isanumber(13bitinteger)locatedinthetransportpacketheader. The PID is used to index MPEG packets. Like IP routers, the MPEG TS handling equipment doesnothavetoreadthe188bytepacketsintheirentirety.ItreliessolelyonthePIDnumberto decideifagivenpacketisrequiredandwhereitistoberoutedto. ThePIDnumberislocatedinthetransportstreamheader.
188 bytes

Header 32 bits

Adaptation Field (Variable)

Payload (Variable)

Sync Byte 8 Bits 0x47

Flags (3 bits)

PID (13 bits)

Flags (4 bits)

Continuity Counter (4 bits)

32 bits
Figure3TypicalMPEGpacket

HANDLINGOFMPEGTABLES AssoonasMPEGhandlingequipmentisconnectedtoaTS,theacquiringequipmentlooksfor theprogramassociationtable(PAT).Ithasnoproblemfindingit,sincethePAThasafixedPID assignment(PID#0). ThePATwillprovidethelocationsofalltheprogramservicesavailableonthisprogramstream bycallingtheirprogrammaptables(PMTs).

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

4/12


Figure4TypicalMPEGtable

Inthisexample,thePATpointstothreePMTs,butonlyoneisdisplayed.
MPEG Structure

PAT (0) Service 3 Service 5 PMT(30) PCR(31) PMT(50)

PCR(51)

Video(31) CC

Audio (34)

VBI (37)

Data(38)

Video(51) CC

Audio (54)

VBI (57)

Data(58)

Service 4

PMT(40)

PCR(41)

Video(41) CC

Audio (44)

VBI (47)

Data(48)

Figure5TypicalMPEGtransportstreamtreediagram

Figure 5 shows a typical tree diagram for a multiprogram transport stream. Once the MPEG handling equipment has acquired all of these tables, it is ready to route the packets to the respectivehardwarethatdecodesthesignal.Dependingonwhichservicestheuserhasselected, differentpacketswillberoutedtotheaudioandvideodecoders.Mostoftheotherpacketswill bediscarded.

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

5/12

41

Video Buffer

Video Decoder

Video Assembler

48

44
Audio Buffer Audio Decoder

Service 4 selected:
1 FFF + Indirect EPG Engine

All Other PID's


Junk Yard

Figure6DemultiplexedMPEGtransportstream

MPEGDESCRIPTORS ServiceDescriptors Once the PES reaches the audio or video decoder, additional information is needed for instructingthedecoderastotheschemethatwasoriginallyusedtoencodethesignal. Typicalcodingstandards: o Video(MPEG1,MPEG2,AVC,etc.) o Audio(MPEGlayer1,DolbyAC3,etc.) Thisinformationiscarriedonan8bitnumbercalledaservicedescriptor.Notethatthevalues areexpressedinhexadecimalformat.
Service Descriptor MPEG2video 01h MPEGlayer2audio 03h DolbyAC3 81h Figure7MPEGservicedescriptors

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

6/12

LANGUAGEDESCRIPTORS Furthermore, as several audio services in several languages may be present on the PES, the decoder needs to be instructed as to the language carried on each video service. Language descriptorswereestablishedforindexingaudioservices.Thelanguageselectionismadeusing aworldwidestandard,ISO639,thatdefinesmostcurrentlanguages.Itassignsa2lettercodeto mostcurrentlanguages.ExamplesoflanguagedescriptorsareprovidedinFigure8. Language ISO639 Descriptor English en French Fr German de Finnish fi Polish Pl Portuguese Pt Russian ru
Figure8MPEGLanguagedescriptors

STREAMCAPACITY Every MPEG transport stream has a given data rate allocation that is normally based on hardwarelimits.Forinstance,anATSCtransmitterislimitedto19.392658Mb/s.Mostterrestrial networksaresoldinincrementsof20Mb/s,e.g.,20,40or60Mb/s.However,ifweaddupall thestreamscomponents(audio+video+data),itsnominaldataratewillnotquitebereached. Theleftoverpayloadwillbefilledwithpacketspackedwithzeros,ornullpackets.Inorderto berecognizedassuchbyanyequipmentinthechain,allnullpacketsmustbecarriedonPID# 1FFFh. The difference between the TS nominal rate and its useful payload is referred to as the headroom.Forexample,a50Mb/sstreamonwhich45Mb/sisoccupiedwithaudio+video+ dataisreferredtoasaTSwith5Mb/sor10%headroom. STREAMSYNTAX Intheapplicationlayer,thesetofrulesthatappliestoatransportstreamanditscomponentsis calledasyntax.Therearethreemainsyntaxesinuse: MPEGbasiclevel(PAT,PMT,etc.). ATSC,forterrestrialtransmissiongNorthAmerica(allMPEGsyntax+ navigationalinformationbasedatPID1ffB[PSIP]). DVB,forsatelliteandterrestrialnetworking(allMPEGsyntax+navigational informationbasedatPID16h[DVBSI]).

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

7/12

FAQs Canunwantedprogramsbefilteredoutfromamultiprogramtransportstream? Tofilteroutunwantedprograms,thestreamgroomingequipmentmust: ModifythePATsothattheunwantedelementsarenotreferredtointhetable. DiscardtheunwantedPIDs(allserviceelements+PMT).


Program Association Table (PAT) Table_id 0x00 Transport_stream_id 0x001234

Program number 3 4 5

PMT PID 30h 40h 50h

MPEG Structure

PAT (0) Service 3 Service 5 PMT(30) PCR(31) PMT(50)

PCR(51)

Video(31) CC

Audio (34)

VBI (37)

Data(38)

Video(51) CC

Audio (54)

VBI (57)

Data(58)

Service 4

PMT(40)

PCR(41)

Video(41) CC

Audio (44)

VBI (47)

Data(48)

Figure9ModifiedMPEGstream(basedontheexampleprovidedinFigure5)

Can incoming services from two different TSs be merged together into a single transport stream? It is possible to merge operations. An MPEG multiplexer is required for this. The following tasksmustbeperformed: EnsurethatnotwoserviceorPIDnumbersareidentical(e.g.,twoservice#2sor twoPID#44s).Iftwoofthemareidentical,themultiplexerwillrenameoneof them. Checkthatthetotalpayloadofthenewexpandedstreamdoesnotexceedthe maximumallowableoutputrate. ModifythePATsothatalltheservicesarerepresented. PassalltherequiredPIDs.
CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork 8/12

PAT

Service 5

PMT(50)

PCR(51)

Video(51) CC

Audio (54)

VBI (57)

Data(58)

Figure10Singleprogramtransportstreamtobeadded


PAT Program Association Table Table _ id 0 x 00 Transport _ stream _ id 0x 001234 Program number 3 4 5 6 PMT PID 30 h 40 h 50 h 60h PAT (0) Service 3 Service 5 MPEG Structure

PMT(30)

PCR(31) PMT(50)

PCR(51)

Video(31) CC

Audio (34)

VBI (37)

Data(38)

Video(51) CC

Audio (54)

VBI (57)

Data(58)

Service 4

PMT(40)

PCR(41)

Service 6 Video(41) CC Audio (44) VBI (47) Data(48) PMT(60) PCR(61)

Video(61 )
CC

Audio (64)

VBI (67)

Data(68)

Figure11Augmentedmultiprogramtransportstream

Canservice1berenamedbygivingitanotherservicenumber(forexample,5)?

Service remapping (in MPEG jargon) is a common feature of most MPEG multiplexers. The multiplexer simply reformats the PAT and PMTs accordingly.

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

9/12

Furthermore, can a PID number be renamed?


Yes.anyPIDcanberenamed,aslongasnoconflictiscreated.However,somePIDnumbersare to be avoided because they might be used in the next service layer (ATSC, DVB). The PID numbers 1FFBh and 16h are reserved for navigational information. 1FFFh is reserved for null packetsandwillbediscardedbyanyequipment,regardlessofwhatthesignaliscarrying. CanMPEGdescriptorsbealtered? Changing service or language descriptors is not advisable. For example, an audio service running with Dolby Ac3 compression is normally carried on a PID holding the service descriptor 81h. If the descriptor is changed to 3h, which means MPEG layer 2 audio, it will becomenondecodable. CanPIDsthatarenotdefinedinanyoftheMPEGtablesbetransportedinanMPEGTS? ThecarriageofghostPIDs(anotherpieceofMPEGjargon;itisusedtodescribeorphanPIDs)is adelicateoperation.AmultiplexercanpassanyghostPIDaslongas: ItisdeclaredintheMUXghostPIDwindows. ItdoesnotcreateaconflictwithanyofthePIDSpresentintheTS. Caution: When a ghost PID is allowed to pass, the MUX loses control over its size. The user must be absolutely certain that an excessive amount of data will not flow through the PID, unlesssufficientheadroompresentintheTS. Ghost PIDs can be reincarnated downstream in the broadcast chain for use in the application layer. CanaTSbecarriedoverdifferentphysicallayers? Transportstreamtranslationispossible,aslongasyoustaywithintheintrinsicphysicallayer bandwidthlimits. The SMPTE310 physical layer is limited to 19.392658 Mb/s. Obviously, a 30Mb/s DVBASI stream cannot be translated into SMPTE310, unless services are dropped until the limit is reached. ASIhasabandwidthlimitofabout214Mb/s. TheEthernetphysicallayerhaslimitsofitsown.ItisbasedonMPEGtolerancetopacketjitter. Thislimitvariesaccordingtothelinkdesign.

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

10/12

Can DVB-ASI be distributed in a broadcast plant using the existing SDI routing infrastructure?
TheDVBASIandSDIsharethesameelectricallayer(270Mb/scoax,NRZcoding).However, theircodinglayersaredifferent.Thus,DVBASIispolaritysensitive,whereasSDIisnot.Some video distribution amplifiers are known to feature 4 noninverting outputs + 4 inverting ones. NoninvertingoutputsshouldbechosentocarryDVBASI. CanaTSbecarriedoveranEthernetelectricallayerbecarriedalongwithotherITtraffic? Yes, but appropriate care must be taken, since the MPEG transport stream carried on the Ethernetdoesnothaveamanagementlayer,andnoqualityofservice(QOS)isappliedtoit. SuccessfulimplementationhasusedsomeoftheexistingITmanagementtools,suchasVLAN. AlthoughMPEGhasworkedreliablyoverundersubscribedlinks,itsperformanceisverylikely todegradeinthepresenceofthepacketjittertypicalofabusyITtransportinfrastructure. Howcanthetransportstreamcomplianceofanygivensyntaxbeassessed? A stream analyzer will give you stream conformity information based on two reference documents: ETR290,forDVBbasedstreams ATSCA78,forATSCbasedstreams Both documents will indicate the alarm that you need to deal with immediately, the one you willneedtohandleshortly,andtheonethatdoesnotreallymatterinthenearterm. CanaTSbetransferredfromonegivensyntaxtoanother? Syntax transfers are possible, but they are a delicate operation because each syntax (ATSC or DVB) uses fixed PID numbers for carrying its navigational information index table. Navigational information can get lost in the syntax translation process. Ghost PIDs will inevitably be created. A special MPEG setup may have to be created to preserve this information if the signal has to be reincarnated into the original syntax. This is a job for an MPEGexpert. Can broadcasters interconnect with a BDU (cablecasters and satellite operators) via a transportstream? Yes.Infact,thisisthepreferredformatformostBDUs.However,afewoperationalrulesneed tobefollowed: Changesinprogramnumbers,PIDnumbers,etc.requireadvancednoticewith theBDU. Streamcompliancehastobemaintainedatalltimes. Thenominalrateofthetransportstreammustremainconstantatalltimes.
CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork 11/12

GuyBouchardistheseniormanagerofNewBroadcastTechnologies (NBT) at CBC/RadioCanada. He is responsible for digital delivery technology studies and projects within CBC Technology. During his 22 years with the CBC, Guy has worked in analog and digital televisiontransmissionandproductionsystems,aswellasinsatellite andterrestrialmicrowavecommunicationsystems.Heholdsadegree intelecommunicationsfromtheUniversitduQubecandisaboardmemberoftheInstituteof ElectricalandElectronicsEngineers(IEEE)BroadcastTechnologySociety.Guyhasbeenserving thebroadcastindustrysince1979withaspecialinterestindigitalcommunicationssystems.He has written and delivered papers on DTV for the IEEE, Canadian Digital Television (CDTV), andtheSocietyofMotionPictureandTelevisionEngineers(SMPTE).

CBCTECHNOLOGYREVIEWJanuary2007 TheDos&DontsofTransportStreamLevelNetwork

12/12

Potrebbero piacerti anche