• No results found

How to choose a CAM

In document Iptv Reference Book (Page 31-37)

It is hard to find information about CAM and smartcard compatibility.

The best case scenario is where one CAM descrambles 12 programs / 24 ES but this is rarely the case. Most CAMs will have a hard-coded limitation or a hardware limitation that will prevent from descrambling more than X programs / ES.

Anevia support collects the experiences of its customer when trying to descramble packages. When trying a new package, ask Anevia before buying a CAM as we may give you some suggestions. If Anevia does not have any experience on a package, find the CAS used by the smartcard and then try all the possible CAM implementing this CAS.

IP networks

Back to our Figure of an IPTV gateway, we saw how to receive DVB-S/DVB-T multiplexed stream, how to demodulate it to obtain a binary stream, how to demultiplex it to extract the interesting ES (audio and video) and how to descramble them with a CAM. We will now see how to send the result to the IP side, using network protocols.

Figure 41: A DVB-S to IPTV gateway in OSI

The MPEG2-TS packets need to be sent to the IP network. On the IP side, as the bandwith is limited, we will often send the SPTS of one TV channel only into one IP stream.

As the TS packets are 188 bytes long and the maximum size for an IP packet is usually 1500 bytes, we can include up to 7 TS packets in 1 UDP/IP/Ethernet packet.

188 × 7 = 1316(< 1500)

Figure 42: An IPTV packet showing all layers of encapsulation

RTP

Real-time Transport Protocol (RTP) may be used optionally for transporting MPEG2-TS packets. The interest

of RTP is that it provides a sequence number over 16 bits (0 to 65536) that adds a new layer of packet loss detection (similar to Continuity Counter in MPEG2-TS).

Each RTP packet contains 7 MPEG2-TS packets and is included into one UDP packet.

UDP

User Datagram Protocol (UDP) is a Transport protocol, level 4 of the OSI model. It is a non-connected protocol

Figure 43: The UDP header

It defines a source port and destination port which must be seen as addresses. The UDP destination port for IPTV is often 1234. In Figure 43, the Application data (message) part is the packets coming from upper layer (either 7 MPEG2-TS packet, either 1 RTP packet containing 7 MPEG2-TS).

IP

Internet Protocol v4 (IP) is a Network layer protocol (level 3).

Figure 44: The IP header

In the Data field of figure 44, it will contain the full packet from the upper layer. In our case, 7 MPEG2-TS within 1 UDP packet.

IP defines a source address and a destination address which are 32-bits (4 bytes) addresses often expressed as a decimal form like X.X.X.X with each X between 0 and 255.

Multicast

Network communications can be of three types:

unicast two hosts are communicating directly

broadcast packets emitted from one host towards all hosts in the same local network multicast one emitter will emit packets to a group of registered hosts

Multicast as we know it is implemented at the Network layer by the IP protocol.

If the destination address of an IP packet is between 224.0.0.1 and 239.255.255.255, it is a multicast destination or

multicast group. Each host from the network can subscribe or unsubscribe from the group by using the Internet Group Management Protocol (IGMP) protocol.

Membership Report Hosts that are interested in joining a specific multicast group send out IGMP membership

reports for that particular group. Reports are sent when first subscribing to the group (Report are then called

IGMP Join) and also replying at each Membership Queries

Membership Query the IGMP querier periodically sends IGMP membership queries to find out if there are still

hosts interested in receiving traffic from a particular multicast group. Hosts must answer with Reports if still interested. If not, then traffic towards not interested local segments is stopped.

Leave group hosts are able to send their intention to leave the group to their local multicast router so that unnec-

essary traffic is stopped right away

The network switch will maintain a table of the hosts that subscribed to the group. Each time a packet is sent to the group, the network switch will replicate it to each registered host. In Figure 45, the red host emits a multicast stream to a multicast group. The network switch M will only copy the packets to the registered hosts in green.

Figure 45: An host emitting to a multicast group (Source: Wikimedia Commons)

Multicast is only able to transport non-connected protocols. It is particularly suitable for live IPTV streaming because it will save the overall bandwith.

Multicast requires a multicast enabled network. This implies that:

• all the switches are IGMP capable, sometimes refered as IGMP snooping,

• a master switch will play the role of IGMP querier. It is the only switch/router to send IGMP Membership Queries

This is often difficult to have multicast over the Internet, thus explaining the success of OTT, see Over-The-Top TV.

Ethernet

Ethernet is a protocol from the datalink layer (level 2).

The ethernet header defines a source ethernet address and a destination ethernet address (also known as MAC

addresses). These are 48 bits (6 bytes) often expressed in hexadecimal form like XX:XX:XX:XX:XX:XX. Each

ethernet card has a fixed ethernet address given by the manufacturer. The first 3 bytes are a manufacturer identifier. The last 3 bytes are unique for each card from the same manufacturer, making each ethernet card unique.

The ethernet destination address of an IP multicast packet will be like 01:00:5E:xx:xx:xx.

The ethernet packet presented in Figure 46 will include the packet form the upper layer in the field Payload, that is the 7 TS over UDP over IP.

RTSP

Real Time Streaming Protocol (RTSP) is a Video-On-Demand (VOD) control protocol from the Application

layer of the OSI model (level 7).

RTSP is not used to transport the audio and video, it is only used to control the streaming which is transported in another way. Typically, the RTSP protocol will be used to start, pause, play again and stop a Video On Demand streaming transported over TS/UDP.

As explained in Connected vs not connected protocols, the RTSP requires an underlying connected protocol and uses TCP.

Figure 47: RTSP is at the Application layer from the OSI model, on level 7

TCP

Transport Control Protocol (TCP) is a connected protocol located at the Transport layer of the OSI model (level

4). It is used over IP. It is used for transporting many protocols like HTTP, FTP, SSH, SMTP, RTSP ...

Figure 48: TCP and IP headers

The TCP header, Figure 48, includes a source port and a destination port that can be seen as addresses. It also includes some flags that can be on or off for each packet:

SYN synchronisation ACK acknowledge

PSH push: packet contains data

FIN end connection gently (wait for ACK) RST reset: end connection (no ACK)

Figure 49: The TCP three way handshake

In document Iptv Reference Book (Page 31-37)

Related documents