article, we're going to be thrifty and frugal, using used servers,
networking switches and free open source software (FOSS) where we can.
We will also be adhering to open standards wherever possible. For our
client use, we will use XBMC for both browser and set top box. We'll
stream out our video locally using UPNP and VLC for centralized
The Source “Head”
I will be using terms from the cable TV providers, a cable head or
“Head” will be used to capture information and distribute services.
As illustrated from the diagram above you will need very little space
for the servers; however, 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 – ok, a throw rug.
The “Head” consist
of multiple servers including LinuxMCE with Asterisk, A2Billing FreeNAS,
and capture devices such HD Homerun.
Capture devices with the internet are used to store video, audio,
and data. UPNP is used to
stream files to either PC’s or the set top box.
UPNP is part of FreeNAS services. However if you are thinking
about multiple locations you may want to investigate the RSYNC and
UNISON services as a means to keep service replicated. This will give
you the ability to replicate using wireless mesh to various locations.
Use the Head and create a URL for this location and each location
would replicate to the Head. This
means you don’t have to push your service out.
The client gets the service.
Streaming Solution provides a simple solution to capture the stream and
redistributes it on a specific IP address with your mesh. Streaming
service as illustrated is designed for a centralized approach while UPNP
can only work on a same subnet as per its service.
When required you can utilize streaming services to provide live
2. Media Player UPNP and SAP Streaming
critical decision in setting up your system is what IP media player you
will be using, as all of them run different software and have different
capabilities. Dedicated set top boxes connect to the TV using a standard
HDMI cable or RCA sockets, and displays PAL/NTSC video at standard
resolution. PC’s having DVI connections and audio outputs can also be
good devices to connect to TV’s.
It’s preferable to use a system such XBMC that can work on
XBMC is an award winning
media center application for Linux, Mac OS X, Windows and XBox. The
ultimate hub for all your media, XBMC is easy to use, looks slick, and
has a large helpful community.
XBMC supports viewing
and playing a vast library of audio, video and image formats. XBMC has a
sophisticated library management system that allows you to organize all
your media to give you quick and immediate access.
XBMC provides a user
friendly interface that's intuitive, very flexible, and easy to use. The
interface is completely customizable through user-created or
XBMC has a built-in
Python interpreter that allows users and developers to write their own
scripts and plug-ins that run inside XBMC using it's own widgets and
controls. It also has a built-in web server that allows it to be
XBMC's audio player
supports much visualization including ProjectM and Goom. In addition, it
allows easy development of visualizations using a simple API.
There are many OEM
vendors of IP set-top boxes to choose from all across the world. Some
examples include Microsoft Xbox 360, Apple TV, Dlink media center,
Netgear extenders, Complete Media Systems, Amino, Kreatel (now
Motorola), and Netgem just to name a few.
The devices have mostly proprietary interfaces and many do not
provide all services such as SAP streaming; however, most work well
using UPNP standard.
Using XMBC software provides the ability to utilize a standard approach
to presenting this new service. Being
Open Source, you can reskin the software to present your own solution.
For now, download the latest stable solution and try it out on an
existing PC, or make your own embedded solution.
You can even use it on Apple TV or old Xbox.
An alternative to XMBC is to use LinuxMCE client or MythTV
3. Setting up the network
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
You can use any router or switch at all, as long as it supports
multicast. 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 (FreeNAS),
you can just use a simple crossover cable. Don't try and run video over
a wireless connection, no matter how good the reception is. This may
work fine initially, but processor-hungry compressed video is another
story. Avoid watching streaming video on the mesh. XBMC has the ability
to run UPNP locally but it will not transverse the MeshAP even if
Multicasting switch is on in WIANA; however, you may want to mount the
share drives in FreeNAS. You
will have similar performance.
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 Homeplug (Ethernet over Power (EoP) power line 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. 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 into a normal
Streaming live broadcast video
content to play on these devices becomes a question of legality.
Copyright laws in various countries prohibit this operation.
It is very important to ensure that a Mesh provider have the
rights to capture and distribute this content.
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 it 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. 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, 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 188.8.131.52 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.
VLC can be used to do
the following applications:
Play back CD, DVD or audio/ video file from the network, hard disk
and other storage media.
Recording of audio and video materials into DVD or other storage
media using different file formats like WMV, AVI, MPEG-2, MP4, MOV, DivX,
VOB and others.
Transcoding audio/ video material from one file format into
another. (ex. Converting DVD VOB file from DVD to AVI file).
Streaming audio and video materials into a network for
point-to-point application using UDP unicast transport protocol. (ex.
Videoconferencing between two sites).
Streaming audio and video materials into a network for
point-to-multipoint application using UDP multicast transport protocol.
(ex. IPTV system)
Video-on-Demand (VOD) application across a network using the HTTP
seen from the diagram, each signal source has a corresponding video
server. To receive satellite signal, we used a DVB-S PCI card installed
in a video server. For the terrestrial broadcast signal, we connected
the audio/video output of a TV tuner to the A/V inputs of a video
graphics PCI card installed in another video server. The same was done
for the CCTV camera whose video signal was fed to the video input of a
video graphics card in the third video server. All the ethernet ports of
the video servers are connected to the same network where the client
workstations are also connected.
5. Preparing VoD content
quality video across your network is split into two separate parts –
getting the video files into the right format using LinuxMCE, and
secondly, setting them up to stream from a video server like FreeNAS.
The main choices for serving video on-demand over our IPTV network are
the open-source UPNP services and SAP Streaming run on Windows, and
Linux.. 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.
FreeNAS uses Fuppes to service UPNP.
Once the media is on FreeNAS you need to publish it to the web so
that XBMC and other UPNP devices can read the services. This can be automated however; a simple cron job can handle
this for you.
6. Creating screens and menus
the TV screen are created XBMC. When
using a set top box or PC you should have XBMC automatically loaded. The
IP set-top box starts up and gains an IP address via DHCP.
Each set-top box's hardware is different; however, there should
not be a different look and feel to the menu system.
Video can be displayed and scaled as any kind of image on the
page, and manipulated. The set-IP will not come with any software
applications pre-installed, so the very first application you need to
create is an assignment of Video, Audio, Pictures to your electronic
programmed guide (EPG) to navigate around your service and watch video
Using XBMC 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. Please se XBMC add-on, plug-ins and
scripts for details.
XBMC is easy to install
and setup, and its many beautiful custom user interfaces offers simple
and very intuitive navigation which is very convenient and flexible,
adding to a great price verses performance ratio when installed on cheap
hardware to this best in class software. With this and experience it
surpasses all retail media center systems.
XBMC supports a very
complete spectrum of audio and video multimedia file formats and
codec’s right out-of-the-box, and includes features such as playlist
playback, audio visualizations, picture viewing, slideshows, and weather
forecast functions, RSS feed scroller on your home screen, together with
a ever expanding array of community driven third-party add-ons and
XBMC can play most audio
and video file formats as well as display images at resolutions up to
1080p FullHD and over with no software limitation from virtually any
source, including your local hard drive, CD/DVDs, USB flash drives, the
Internet, and network shares, up scaling any lower resolutions videos to
the maximum of your displays capability. XBMC can also playback DVD-Video
movies with menus from ISO/IMG-images on the fly, even when they are in
a RAR or ZIP archive. For music playback, XBMC offers Replay Gain,
gapless, cross fading, cue sheet, and pre-amplification playback
options, as well as advanced smart playlists, and chapter support.
XBMC can download or
stream Internet video and audio streams, and play Internet radio
stations (such as Podcasts and SHOUTcast), and you can listen to your
favorites and discover new music with free, streaming music from Last.fm,
XBMC of course handles
all common digital picture formats with the options of panning/zooming,
and slideshow with “Ken Burns Effect“. XBMC also handles CBZ and CBR comic book
archive files, this feature lets you view/read, browse and zoom the
pictures of comics pages without uncompressing them first.
XBMC has a database
driven video and music library, which help, organize and filter all of
your media straight out-of-the-box. The video library allows you to
easily browse your video content by things like; genre, title, year,
actors, and directors, as well as carry our extensive searches on casts
and related information. Similarly, XBMC’s music library allows the
organization of your music collection by information stored in your
music file ID meta tags, like title, artist, album, genre and
popularity, as well as having access to powerful search and Smart
Playlists features, helping you find exactly what you want in a fast and
XBMC takes full
advantage of broadband Internet connections if available; Artwork is
automatically fetched for posters; artwork, fan art, synopsis and
reviews on movies; plot, cast and episode information for TV shows and
also album covers and artist information for music.
XBMC features a Python
Scripts Engine and WindowXML application framework (a XML-based widget
toolkit for creating a GUI for widgets) in a similar fashion to Apple
Mac OS X Dashboard Widgets and Microsoft Gadgets in Windows Sidebar.
Python widget scripts allow normal users to add-on ‘extensions’ with
new functionality to XBMC themselves, using the easy to learn Python
scripting language, without the need for knowledge of any complex
programming languages or the inner workings of XBMC. Current plug-ins
and scripts include a multitude of added functions like Internet TV and
radio streams, podcasts, movie-trailer browsers, and cinema guides,
e-mail clients, instant messaging, train-timetables, peer-to-peer
file-sharing downloader’s, IRC, also casual games (sometimes also
referred to as mini-games or party-games) such as Tetris, Snake, Space
Invaders, Sudoku, and much more.
XBMC is noted and highly
regarded as having a very flexible GUI toolkit and robust framework for
its GUI,. Users can create their own skins, or choose one of the many
already available skins. XBMC uses a standard XML base, making
theme-skinning and personal customization very accessible to everyone.
Users themselves can create their own skin (or simply modify an existing
skin) and share it with others via public websites dedicated for XBMC
skins trading. Colors, controls, navigation, positioning of elements,
animation, even adding additional functionality can be achieved with a
skin. “Project Mayhem” is the official skin from Team-XBMC; which is
now in its third version, commonly know as “PM3″. Many
third-party skins exist while many are of original and unique designs, a
few skins are almost exact replicas of other multimedia software, with
skins clones of Apple TV and Front Row, Microsoft Windows Media Center
Edition (MCE), Media Portal, Meedio/MeediOS, HDeeTV, Kaleidescape, Xbox
360, PlayStation 3, and others. Each skin provides a totally different
and unique user experience, all showing just how flexible XBMC’s
skinning engine really is.
7. Quadruple Play Service
quadruple play service
combines the service
of broadband Internet access, television and telephone with wireless
This marketing term does leave some complication for Access control and
billing. For example, WIANA
is used to control User for Wireless Mesh and has a community base
billing system; A2Billing is used to provide access and billing for
Asterisk, FreeNAS has group access control using Samba but does not have
a billing system. At this
time there is not a known Open Source billing system that can control a
quadruple play. The only
one that has a very close solution is A2Billings; however, you may also
need a Radius server.
8. Dynamic Name Service (DNS) & Quality of Service (QoS)
When you are
building your servers you want to ensure that anyone from the wireless
mesh can have access to your servers.
The assumption is that the Servers would have there own URL and
can be accessed by the outside world; however, you can also keep it as
intranet using “hosts” file in /etc/hosts and assign a name in each
MeshAP. This would give you access only in the Wireless Mesh.
Since you are distributing video and audio from FreeNAS to other
FreeNAS servers the QoS is not required; however if you are making a
centralized approach to viewing you may want to ensure that QoS goes
directly to the server. Adding
a second Ethernet card to FreeNAS and having MeshAP hook directly to
this device achieve the QoS.
9. Show ME
Once you have your
network set up, it’s up to you to create menus
and screens, and adding video content onto your video server that
can be played back through the TV. The production procedure is the same
as it is for a XBMC, 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 – well almost anything.