240 likes | 373 Views
IP TV. What is an IP TV ?. Definition. Internet Protocol television ( IPTV )
E N D
IP TV What is an IP TV ?
Definition • Internet Protocol television (IPTV) • is a system through which internet television services are delivered using the architecture and networking methods of the Internet Protocol Suite over a packet-switched network infrastructure, e.g., the Internet and broadband Internet access networks, instead of being delivered through traditional radio frequency broadcast, satellite signal, and cable television (CATV) formats.
What we need to run it? • A TV • An IP set-top box • A multicast-capable router • A web server • A video server • 2 x PLC Adaptors • Sample video material
How to set up • In this guide, we're going to be cheap and cheerful, using free open source software (FOSS) where we can. We'll also be adhering to open standards wherever possible. Our HTML screens and menus will be housed on an Apache web server running PHP, Perl, Python & MySQL, and our video will be encoded in MPEG-4 H.264 AVC, packaged in a simple MPEG-2 transport stream. We'll stream out our video with VLC and Helix Server. Naturally you can exchange any of those for something else that does the same thing, for example, WM9/IIS/.Net/SQL Server instead of MPEG-4/Apache/PHP/MySQL.
1. Finding a new home for the kit • Luckily, your brand new shiny IPTV system won't need much space at all. The 2 PCs (web server and video server) can be hidden away under a desk, kept in a server room or tucked away under the stairs somewhere. Using PLC adaptors means you don't need cabling dangling around. What you will need is a space for demonstrating it on a TV. That could be on a desk, in reception or in a corner of the office with a couch.
2. Choosing the right set-top box • The most critical decision in setting up your system is what IP set-top box you will be using, as all of them run different software and have different capabilities. All of them connect to the TV using a standard scart cable or RCA sockets, and display PAL/NTSC video at standard resolution. It's preferable if they have a web-based control panel, but many have proprietary configuration screens or use simple telnet. Firmware upgrades are best served with a remote TFTP server, such as that provided by vendors like SolarWinds.
The most popular choice of software is an embedded web browser, which for all intents and purposes does the same thing as a PC web browser like IE, Firefox, Opera or Safari. The developer interface tends to be a mark-up language, usually HTML/Javascript. The main embedded client software programs in use on IP set-top boxes today are Fresco/Galio (from Ant Plc), Opera, Escape/Evo (from Espial) and Myrio (based on Espial). You can think of them of little web browser units. There are a lot of OEM vendors of IP set-top boxes to choose from all across the world. Some examples include Complete Media Systems, Amino, Kreatel (now Motorola), Vidanti, Tilgin (formely i3 Micro), ADB Global and Netgem. Most are open to the idea of directly selling 1-10 units at a time, although in many instances it is better to go through a central distributor like Garland Partners. The cost varies, but you should be paying in the range of £100-250 GBP for each set-top box, including a remote control and/or keyboard. In this guide, we will be using the CMS 1080 (from Complete Media Systems), running Ant Galio 2.0. The box itself supports video delivered in H.264 AVC or Windows Media. We will be using the former.
3. Setting up the networkIPTV runs over an IP network, which means it will work over your existing home or office Ethernet network. You'll probably already have a router or switch that your desktop PCs are plugged into, although it will be best to create a new, separate network for your TV as the traffic load is much higher than a normal data network designed for internet and/or LAN connectivity. You can use any router or switch at all, as long as it supports multicast. Any $50-200 product from the high street or online retailer will do. Check the side of the packaging or the manufacturer's documentation to see if the product you choose supports multicast natively (IGMP etc). Normal 100Mbit Ethernet is fine, although use Gigabit Ethernet if at all possible. If you're running all the screens and video from one server (for example, a portable laptop demo), you can even just use a simple crossover cable. Don't try and run video over a wireless connection, no matter how good the reception is. HTML screens and menus will work fine, but processor-hungry compressed video is another story. An IP set-top box is just another network client device. When it is connected to the IP network, it is assigned an IP address by DHCP just as a desktop PC would be (this can also be static). If your router doesn't act as a DHCP server, you don't have a network gateway or are experiencing problems with a crossover cable, simply download and install a free DHCP server from the internet onto your web server PC. Your PLC (powerline communication) adaptors create an Ethernet network over existing electricity cabling, which avoids the need to have wiring everywhere when you can't use wireless. They generally come in pairs, and cost £100-200 from the high street, your ISP or online retailers. The first should be plugged into an AC plug near the router, and the second should be plugged in next to the set-top box. Both then have Ethernet sockets which you plug normal cat-5 cable into.
4. Streaming live broadcast video • The first thing to simulate on your IPTV system is live TV that can be tuned into, and this can be done in two ways. The first is easy, the second is either painful or expensive. Live broadcast IPTV needs to be multicasted 24-7 over the IP network, as unicast is too inefficient. We will be streaming live TV from our video server. For each channel, we need to broadcast a 5 minute looping pre-captured video clip to a multicast IP address. For this, we can use the free VLC player, or the industry standard WinSend, created by Pixstream. The clip itself ideally needs to be previously encoded in MPEG-4 H.264 AVC, and formatted into an MPEG-2 transport stream. However, VLC being the Swiss army knife it is means we can convert open virtually any video file and encode it on the fly as we are broadcasting. Open your video file, and use the advanced options in VLC to stream the output onto the network as UDP, using a multicast address such as 235.5.5.5 to a random port (such as 10201). You can test if the stream is being correctly outputted by opening the same network stream with another copy of VLC on another computer on the network. Do this for as many channels as you require. Once they are broadcasting, the set-top box will be able to tune into the multicast stream just as VLC does. The more advanced way to provide live broadcast TV (such as Freeview) over an IP network is to convert MPEG-2 video received from a DVB receiver (a TV tuner card, for example those made by Hauppage) into multicast format, which is known as IP encapsulation. The painful way is to code your own encapsulation program using the vendor's SDK, and the expensive way is to buy industrial hardware that does it for you (for example, Exterity, Aneviaetc).
5. Preparing VoD content • Making DVD quality video across your network is split into two separate parts – getting the video files into the right format, and secondly, setting them up to stream from a video server. The bad news is that there isn't a free or open source VoD server that you can use to exactly simulate what would happen in a commercial service. Your video material will need to be pre-encoded in the same way the live multicast video is. Software encoders from vendors like Elecard, MainConceptCyberlink and Nero will easily compress video from most formats (MPG, AVI, MOV etc) into MPEG 4 H.264 AVC, but they will additionally need to be encapsulated in an MPEG-2 transport stream for delivery over the network. The free open-source Media Coder program produces excellent results.
Video is very temperamental and requires state control, unlike typical web protocols such as HTTP. RTP (real-time protocol) and RTSP (real-time streaming protocol) were designed to provide VCR-like controls for IP networks, and most, if not all commercial VoD servers use these technologies for delivering quality-assured video. A lot of set-top box manufacturers have adapted their hardware to be able to simulate VCR-like features using HTTP so video can be streamed directly from a web server like Apache. We will use a combination of both to stream files ending in .mpg.
The main choices for serving video on-demand over our IPTV network are the open-source Helix Server and Darwin Streaming Server, both of which come in Windows flavour, but can also run on Linux. We also have a trial of the Elecard RTSP server that can also be run on either OS. If your own network is set up to use Windows Media, you can happily and easily unicast and/or multicast video from a Windows Server PC running the free Windows Media Server.
Once the video files have been pre-encoded, they need to be placed in the directory on the video server that has been allocated as the storage folder, as well as mirrored in the Apache web directory allocated on the web server. Almost all the RTSP servers have a web-based configuration panel and will need to index/identify each file for streaming. Once these are in place, test the RTSP capacity of the server by opening a network stream to them in VLC, and once any problems are corrected, your IP set-top box will play them using its in-built API.
6. Creating screens and menus • Menus for the TV screen are created in HTML, CSS and Javascript, just as normal web pages are, using the same standard tools (Dreamweaver, Photoshop etc). The software on the device is an ordinary web browser like IE, Firefox, Opera or Safari, and overlays the web pages you create on the screen through the scart cable (OSD). Most have full support for open standards and current technologies such as RSS and AJAX. Some also include the Macromedia Flash 6 player. It's a case of write, and then refresh the browser screen, just like normal web development.
When the IP set-top box starts up and gains an IP address via DHCP, it will also request a “starting” URL of a web page from a web server, in the same way a PC web browser (e.g. IE, Firefox) will request a default home page. Producing screens for IPTV is almost the same as building an intranet site, with the only difference being that the HTML and Javascript contains set-top box-specific code that only the set-top box understands and executes (e.g. for tuning into multicast streams or issuing RTSP commands).
Each set-top box's hardware is different, so there is a different Javascript API for each device model that must be obtained from the manufacturer. Video can be displayed and scaled as any kind of image on the page, and manipulated by normal Javascript functions. The set-IP will not come with any software applications pre-installed (or even commands on the remote to go back or refresh the screen), so the very first application you need to create is an electronic programme guide (EPG) to navigate around your service and watch video streams.
When mocking up screens in Photoshop, it is important to know that a standard definition PAL TV screen is 720 pixels wide by 576 pixels wide, before the so-called “safe area” is taken into account. Colour is considerably more primitive and much more sensitive to variance than on a desktop browser. The only input device available is a remote control with key codes similar to a desktop keyboard. Using HTML for menu and screen displays means content can be dynamically generated using a server-side process just like any web page. The TV screen displays whatever you send it, meaning you can integrate any type of web-based system into your new IPTV network, such as the Asterisk VoIP PBX, the Jabber IM server, multiplayer game servers, your own web application or an external XML API.
7. Showtime! • Once you have your network set up, its up to you to get creating menus and screens, and adding video content onto your video server that can be played back through the TV. The production procedure is exactly the same as it is for a website, only with TV-specific functionality and usability issues. Over a few days or weeks, you suddenly have an entire TV network to yourself that you can do anything to, just as when you have your own website that you can do anything with. Once you're happy with what you've put together, its time to sit down the boss, colleague, wife, girlfriend, boyfriend or fellow interested nerd and beam with pride as you press buttons on that remote and surf around.
Advantages of IPTV • * It is possible to pause a live transmission through IPTV. The viewer will no longer miss any part of his/her programme if he/she has to attend to urgent work.* IPTV lets you record your favouriteprogrammes so that you can watch them at a time convenient to you. Furthermore, you can record multiple programmes at the same time through IPTV.* IPTV ensures high quality of sound and picture, almost like when a DVD is played.* All the channels that are live and are being broadcast can be availed through IPTV. Thus, a viewer does not miss out on any of his favourite shows that run on ‘rarely available’ channels.* IPTV is not affected by changes in the weather unlike cable TV and DTH service. Apart from being a high quality service, IPTV gains a brownie point for providing uninterrupted transmission during bad weather.
Advantages Network architecture affords unlimited channel capacity Advanced features Allows telecom operator to utilize portions of its existing network Disadvantages Challenged by high bandwidth applications like HDTV New technology – still several “kinks” to be worked out Content acquisition challenges IPTV Advantages/Disadvantages
Disaster recovery plan • Backup online • Hot side
References • http://www.iptvworkshop.co.uk • http://www.tvover.net • http://wikipidia.com www.pivot-media.com