Documente Academic
Documente Profesional
Documente Cultură
An LG Electronics Company
Video channels
A video stream
One or more audio streams
Possibly one or more data streams
Audio channels
An LG Electronics Company
Page 3
Each
E
h packet
k t contains
t i any ONE ki
kind
d off iinformation
f
ti
audio, video, data, PSI,
One
Transport
(MPEG)
Packet
An LG Electronics Company
Page 4
Packets
P
k t b
belonging
l
i to
t th
the same elementary
l
t
stream
t
are
identified by packet id (PID) in packet header (same
color in our illustrations).
)
Page 5
Sync
Byte
PID
188 Bytes
Continuity
Counter
Adaptation
Adaptation
Field
Field
(Optional)
An LG Electronics Company
PES 1
x
Page 6
The d
Th
decoder
d mustt fi
firstt id
identify
tif the
th beginning
b i i off
packets before it can interpret the stream
01010001111010010101101010001100011110010111000
MPEG Data Prior to
Packet Sync
An LG Electronics Company
Page 7
01010001111010010101101010000100011111000111
An LG Electronics Company
Page 8
Once the decoder finds a 0x47 in the stream, it looks 187 bytes
down the stream, and looks for another 0x47
0x47
187 bytes
0x47
187 bytes
0x47
187 bytes
An LG Electronics Company
0x32
11010101010111011010101010001
Page 9
ASI to Gig-E
ASI to Microwave or QAM
Satellite to ASI
An LG Electronics Company
Page 10
PSIP Generator
Video
PAT
Audio
PMT
Data channel
Dataenhanced
Audio/Video
channel
Audio/Video
channel
Data Server
Data
Null
PSIP
Data Server
Audio Encoder
MultiM
lti
plexer
Video Encoder
Audio Encoder
Video Encoder
MPEG-2 Transport Stream
An LG Electronics Company
Page 11
Video/Audio
channel
Video/Audio
channel
Video/Audio
channel
A di Encoder
E
d
Audio
PAT
Video Encoder
PMT
Audio Encoder
CAT
Video Encoder
Audio Encoder
Null
Video
Audio
Video
Audio
Vid
Video
Audio
Video
Audio
MultiM
lti
plexer
Video Encoder
Audio Encoder
Video Encoder
MPEG-2 Transport Stream
An LG Electronics Company
Page 12
PSI via PID assignments and descriptors tells the decoder that these PIDS go
together
g
to make up
pap
program
g
An LG Electronics Company
Page 13
Decoder: Receiver or
set top box
Program
01 Video
Vid
Program
02 Video
Program
03 Video
PAT/PMT
/MPEG
Tables
T bl
An LG Electronics Company
PSIP
Tables
Program
02
Audio Program
Program
03 Audio
01 Audio
A di
Page 14
Metadata
An LG Electronics Company
Page 15
An LG Electronics Company
Page 16
An LG Electronics Company
Appears
pp
in PID 0x0000
An LG Electronics Company
Page 18
PMT 1
Video PID 0x31
Audio PID 0x34
Audio PID 0x35
PCR_PID 0x31
PMT 2
PID 0x40
PMT 3
Video PID 0x51
Audio PID 0x54
Audio PID 0x55
PCR_PID 0x51
An LG Electronics Company
Page 19
Elementary streams
found in this PMT
Descriptor
Defines
Additional
Stream
Characteristics
Elementary streams
found in this PMT
(PID 0x0000)
Program 2
PID for
PMT
Program 3
PID for
PMT
An LG Electronics Company
Page 20
PSI
PID assignments
Th
These
PIDS go ttogether
th
An LG Electronics Company
Page 21
An LG Electronics Company
PSIP Background
Page 23
An LG Electronics Company
Page 24
Signaling vs Announcement
Signaling
Provides linkages
Ex: PMT and/or VCT used to link different components of television
program (i.e. video and audio)
Announcement
An LG Electronics Company
Page 25
Encoder(s)
Time
PSIP
Generator
Remote
e ote
GUI(s)
Automation
System
Listing
g
Service
Staging
Server
M
U
X
F
I
R
E
W
A
L
L
An LG Electronics Company
Page 26
Sync
Byte
PID
188 Bytes
Continuity
Counter
Adaptation
Adaptation
Field
Field
(Optional)
An LG Electronics Company
PES 1
x
Page 27
STT - System
S t
Ti
Time Table
T bl
- Appears in PID 0x1FFB
- Gives current UTC time.
An LG Electronics Company
I t
Interval:
l 1
1,000ms
000
(1 sec))
Page 28
An LG Electronics Company
Page 29
PAT
PAT
points
points
to to
PMT
PMT
PSIP
metadata
tables: VCT,
MGT, STT,
EITs & ETTs
An LG Electronics Company
Page 30
(EIT-0 thru 3)
Major
j channel rules from PSIP ((A/65B)
/
) adopted
p
Correct Major Channel number must be used
Correct TSIDs (Transport Stream ID) must be used
An LG Electronics Company
Page 31
An LG Electronics Company
Page 32
An LG Electronics Company
Page 33
An LG Electronics Company
Page 34
An LG Electronics Company
VCT (Virtual
(Vi t al Channel Table)
Table ID
Section Syntax Indicator
Section Length
Transport
p
Stream ID (TSID)
(
)
Version Number
Current Next Indicator
Section Number
Last Section Number
ATSC protocol version
Number of Channels in Section
Short Name
Major Channel Number
Minor Channel Number
Modulation Mode
Channel TSID
Program Number
Extended Text Message Location
Descriptor Length
Descriptor ( )
Source ID
Service Type
Access Controlled
Hidd / Hide
Hidden
Hid Guide
G id
Copyright 2011 Triveni Digital, Inc.
Page 35
(PID 0x1FFB)
Virtual Channel
Short
Sh t Channel
Ch
lN
Name
Major Channel Number
Minor Channel Number
Modulation Mode
Frequency
F
TS ID (of Virtual Channel)
Program Number (in Stream)
Extended Text Location
Access
A
Controlled
C t ll d ?
Hidden ? Hide from Guide?
Service Type (A/V/D)
Source ID
Service
S i L
Location
ti Descr
D
other descriptors
An LG Electronics Company
Video Stream
Eng Audio Stream
Fre Audio Stream
Page 36
PMT 1
(On PID 0x30)
Station TSID
An LG Electronics Company
VCT
On Pid 0x1FFB
4-1
WXXX
Video PID 0x31
Audio PID 0x34
PSIP table
Page 37
Continuity Counter
An LG Electronics Company
An LG Electronics Company
Page 39
14
15
10
An LG Electronics Company
11
Page 40
An LG Electronics Company
Page 41
C ti it errors create
Continuity
t b
bogus alarms
l
iin other
th areas.
Until you resolve the continuity problems, it will be very hard to
determine if you have other problems in your stream
To Be Discussed
To Be Discussed
An LG Electronics Company
Page 42
An LG Electronics Company
Page 43
Elementary
y streams:
Encoding Video & Audio
Data
An LG Electronics Company
MPEG--2 / MPEGMPEG
MPEG-4 Video Compression
An LG Electronics Company
Page 45
I Frames
I-picture: intra-picture encoding, similar to jpeg encoding
(exploiting spatial redundancy).
An LG Electronics Company
Page 46
B Frames
B-picture: bi-directional encoding, using motion adjusted
An LG Electronics Company
Page 47
P Frames
P-picture: predictive encoding, using motion adjusted deltas
from a p
previous reference frame (exploiting
( p
g temporal
p
redundancy).
An LG Electronics Company
Page 48
An LG Electronics Company
Page 49
PES
Header
PES Packet
Payload
PES
Header
PES Packet
Payload
PES
Header
PES Packet
Payload
Header (4 Bytes)
Sync
Byte
PID
188 Bytes
Continuity
Counter
Adaptation
Adaptation
Field
Field
(Optional)
Flags
PES 1
x
Optional
Fields
Stuffing
Bytes
PCR
An LG Electronics Company
Page 50
All frames within the GOP depend directly or indirectly on data from
the I frame
A GOP begins
g
with an I frame and ends with last frame before the
next I frame
An LG Electronics Company
Page 51
B-picture
I-picture
B-picture
I-picture
An LG Electronics Company
Page 52
T i l GOP Structures
Typical
S
I Frame
216.6 Kb
B Frame
49 9 Kb
49.9
B B
P B
B P B B P B
P Frame
83.45 Kb
B P B B P B
B P B B
P Frame
59.9 Kb
P P
P P
P P
P P P
P P
P Frame
44.5 Kb
P P P P
P P
P P
P P
Page 53
An LG Electronics Company
Page 54
AC
AC--3 Audio Encoding
Encoded
E
d d frame
f
size
i depends
d
d only
l on bitrate.
bit t
Encoded frames are packed into packetized
elementary stream (PES) packets.
packets
An LG Electronics Company
Page 55
Q: In MPEG
MPEG--2 video encoding, what
are the three video frame types
called?
An LG Electronics Company
Page 56
Video
deo and
a d Audio
ud o
Syncronization using
PCR
An LG Electronics Company
Audio--Video Synchronization
Audio
An LG Electronics Company
Page 58
An LG Electronics Company
Page 59
This
Thi time
ti
reference
f
is
i called
ll d the
th PCR:
PCR Program
P
Cl
Clock
k
Reference
Encoder
27Mhz Clock
MPEG Packets
MPEG
Packet with
PCR Stamp
An LG Electronics Company
Page 60
The clock
Th
l k iis actually
t ll a counter
t which
hi h advances
d
every
1/27000000 seconds
Encoder
Decoder
27Mhz Clock
27Mhz Clock
1,2,3,4..
1234
1,2,3,4..
An LG Electronics Company
Page 61
The
Th clock
l k iis actually
t ll a counter
t which
hi h advances
d
every
1/27000000 seconds
Encoder
Decoder
27Mhz Clock
27Mhz Clock
1,2,3,4..
1234
1,2,3,4..
An LG Electronics Company
Page 62
The
Th clock
l k iis actually
t ll a counter
t which
hi h advances
d
every
1/27000000 seconds
Decoder
Encoder
27Mhz Clock
Massive
Network
Processing
1,2,3,4..
An LG Electronics Company
27Mhz Clock
1234
1,2,3,4..
Page 63
E
Encoder
d possibly
ibl time
i
stamped
d incorrectly
i
l
An LG Electronics Company
Page 64
Difference between
the Actual Value of the PCR time stamped by
encoder
and
the Expected
th
E
t d Value
V l off the
th PCR as calculated
l l t d by
b
decoder based on the clock rate and the time
at which the PCR value is received.
received
500ns
An LG Electronics Company
Page 65
Difference between
the clock frequency calculated at decoder
based on actual PCR values received
and
an ideal
id l 27 MHz
MH clock,
l k which
hi h is
i the
th clock
l k rate
t
dictated by the MPEG-2 standard
+/- 810 Hz
Copyright 2011 Triveni Digital, Inc.
Page 66
Heres Why
An LG Electronics Company
Page 67
PID
Video 0x41
Video 0x51
Packet
Spacing
0x31
2 Packets
0x41
1 Packet
0x51
0 Packets
An LG Electronics Company
Transport
Stream
MUX
Page 68
Video 0x41
Video 0x51
Transport
Stream
MUX
PID
Old Spacing
New Spacing
0x31
2 Packets
8 Packets
0x41
1 Packet
5 Packets
0x51
0 Packets
2 Packets
An LG Electronics Company
Page 69
An LG Electronics Company
Page 70
An LG Electronics Company
Page 71
Three
Th
off the
th mostt common are:
It can happen
pp
at the source encoding
g
An LG Electronics Company
Page 72
This
Thi is
i relatively
l ti l rare, however
h
An LG Electronics Company
Page 73
Three
Th
off the
th mostt common are:
It can happen
pp at the source encoding
g
lag
An LG Electronics Company
Page 74
provide
id buffering
b ff i and
d use high
hi h level
l
l math
th to
t smooth
th
out the network lag.
An LG Electronics Company
Page 75
An LG Electronics Company
Page 76
An LG Electronics Company
Th
l off th
l off th
d
The value
the PTS iis sett tto th
the value
the E
Encoder
Clock when the frame is encoded
Encoder
27Mhz Clock
MPEG Packets
1,2,3,4..
F1
PTS
500
F2
PTS
950
Packetizer
An LG Electronics Company
Page 78
1,2,3,4..
Buffer 1 Pid 0x31 Video
An LG Electronics Company
Page 79
1,2,3,4..
Buffer 1 Pid 0x31 Video
F1
PTS
500
F2
PTS
675
F3
PTS
950
An LG Electronics Company
F2
PTS
990
Page 80
Decode
Hardware
27Mhz Clock
MPEG Packets
F1
PTS
200
= 200
Buffer 1 Pid 0x31 Video
F1
PTS
500
F2
PTS
675
F3
PTS
950
An LG Electronics Company
Page 81
Next Frame
Decoder
Decode
Hardware
27Mhz Clock
MPEG Packets
F1
PTS
500
= 500
Buffer 1 Pid 0x31 Video
F2
PTS
675
F3
PTS
950
An LG Electronics Company
Page 82
Decode
Hardware
27Mhz Clock
MPEG Packets
F2
PTS
675
= 675
Buffer 1 Pid 0x31 Video
F3
PTS
950
Buffer 2 Pid 0x34 Audio
F2
PTS
990
An LG Electronics Company
Page 83
If data
d t appears too
t llate
t iin th
the ttransportt stream,
t
b ff
buffer
underflow results.
An LG Electronics Company
Page 84
PCR jitter
jitt can cause synchronization
h i ti problems
bl
for
f
elementary streams
Ensure
An LG Electronics Company
Page 85
An LG Electronics Company
Page 86
C ti it errors create
Continuity
t b
bogus alarms
l
iin other
th areas
Until you resolve the continuity problems, it will be very hard to
determine if you have other problems in your stream
To Be Discussed
An LG Electronics Company
Page 87
MPEG Troubleshooting
T
bl h ti
using
g the MTMT-40
An LG Electronics Company
Firmware implementation
Buffer sizes
Software decoding capability
An LG Electronics Company
Page 89
Not all Set top boxes will respond the same way to the same
underlying problem
Standards violations in digital Transport Streams may show up on a
receiver
i
only
l iintermittently
t
itt tl
An LG Electronics Company
Page 90
Customer calls into station or NOC audio dropping out on their set
In station video monitors & set top boxes do not have any problems
How serious is this problem?
Encoders
Encoders
Encoders
Encoders
QPSK
Satellite
Dish
Satellite
Receivers
R
S i lli
Satellite
Satellite
Receivers
Receivers
MUX
Network
Processing
QAM
Modulator
Digital to
Analog Mod
PSIP Gen
Data Gen
Cable TV Scenario
An LG Electronics Company
Page 91
QPSK
Satellite
Dish
Satellite
Receivers
R
S i t llit
Satellite
Satellite
Receivers
Receivers
ASI
ASI
MUX
ASI
Network
Processing
Gigabit-IP
QAM
Modulator
ASI
PSIP Gen
Data Gen
Digital to
Analog Mod
Cable TV Scenario
Transport Stream
Analyzer
An LG Electronics Company
Page 92
An LG Electronics Company
Page 93
QPSK
Satellite
Dish
Satellite
R Satellite
Receivers
S i t llit
Satellite
Receivers
Receivers
ASI
Gigabit-IP
ASI
MUX
ASI
Network
Processing
QAM
Modulator
Digital to
Analog Mod
ASI
PSIP Gen
Gigabit
Ethernet
Input
Data Gen
Transport Stream
Analyzer
An LG Electronics Company
Page 94
An LG Electronics Company
Page 95
QPSK
Satellite
Dish
Satellite
Receivers
R
S i t llit
Satellite
Satellite
Receivers
Receivers
ASI
ASI
MUX
ASI
Network
Processing
Gigabit-IP
QAM
Modulator
ASI
PSIP Gen
Digital to
Analog Mod
ASI
Input
Data Gen
Transport Stream
Analyzer
An LG Electronics Company
Page 96
An LG Electronics Company
Page 97
QPSK
Satellite
Dish
Satellite
Receivers
R
S i t llit
Satellite
Satellite
Receivers
Receivers
ASI
ASI
MUX
ASI
Network
Processing
Gigabit-IP
ASI
PSIP Gen
ASI
Input
Data Gen
QAM
Modulator
Digital to
Analog Mod
Cable TV Scenario
Transport Stream
Analyzer
An LG Electronics Company
Page 98
QPSK
Satellite
Dish
Satellite
Receivers
R
S i t llit
Satellite
Satellite
Receivers
Receivers
ASI
ASI
MUX
ASI
Network
Processing
Gigabit-IP
Digital to
Analog Mod
ASI
PSIP Gen
QAM
Modulator
Data Gen
Record at
this point
Record at
this point
Cable TV Scenario
Transport Stream
Analyzer
An LG Electronics Company
Page 99
QPSK
Satellite
Dish
Satellite
Receivers
R
S i t llit
Satellite
Satellite
Receivers
Receivers
Analyze, Monitor or
Record Streams at any Broadcast Scenario
of these points
Gigabit-IP,
ASI or
SMPTE 310
ASI
ASI
MUX
ASI
Network
Processing
Gigabit-IP
ASI
PSIP Gen
Television
Transmitter
QAM
Modulator
Data Gen
Digital to
Analog Mod
Cable TV Scenario
Error Alerts:
SNMP,
SMS,
E-Mail,
Triggered Recording or
Contact Closure
Error
Notification
Transport Stream
Analyzer or
Remote Monitor
An LG Electronics Company
Page 100
C ti it errors create
Continuity
t b
bogus alarms
l
iin other
th areas
Until you resolve the continuity problems, it will be very hard to
determine if you have other problems in your stream
An LG Electronics Company
Page 101
PAT
PMT
PCR
Interval:
100ms
Interval:
400ms
Interval:
100ms
Max
Jitter:
500ns
An LG Electronics Company
Page 102
References
An LG Electronics Company
Page 103
In the Caribbean:
Mario Sebastiani
msebastiani@incospec.com
@
p
Bernard How
bhow@incospec.com
Page 104
Thank you-Gracias-Merci-Danki
MPEG 101
Transport Stream Demystification
An LG Electronics Company