Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


455 posts

Ultimate Geek
+1 received by user: 107

Trusted

Topic # 161659 15-Jan-2015 06:38
16 people support this post
Send private message

Background

I've been planning and working on this project for at least 12 months and I have looked at several options and discarded some during planning.

As a European at heart I like to stay informed of what's going on in my home country and surrounding countries and I'm sure you are aware that reception of any European satellites in NZ is impossible due to the satellites being behind the horizon.
There are some "compilation" channels available on the less popular Optus satellites but they can not replace what is being broadcast on the main channels in Europe.
Also with the thought of wanting to raise children bi-lingually in NZ I felt the need to be able to supply European TV into NZ. Both live as well as recorded due to the time difference.

I have looked at a range of options, including the popular Slingbox. There are professional hardware encoders costing up to $4000 but they provide limited flexibility.
In the long run I decided that the best way forward was to build my custom Linux box and connect it to digital cable (DVB-C) and locate it in my parents house.

Why DVB-C? It was too much hassle to install a satellite dish and pull cables in the short timeframe available. DVB-T has appalling bitrates and DVB-C is both stable as well as adequate.


Shopping basket

So I've sourced the following hardware:

Case: Inwin BM639 Black Mini ITX Case + HD Audio + 120W PSU
MB: Asus H81I-PLUS (Socket 1150, Intel H81, DDR3, S-ATA 600, Mini ITX, PCI Express 2.0, HDMI, USB 3.0)
CPU: Intel Core i3 4130T - 2.9 GHz - 2 cores - 4 threads - 3 MB cache - LGA1150 Socket
RAM: Corsair CML8GX3M2A1600C9 Vengeance Low Profile 8GB (2x4GB) DDR3 1600 Mhz CL9
Disk: OCZ AGT3-25SAT3-60G Agility 3 60GB SATA III 2.5 inch SSD
Storage: WD Red 3TB for NAS 3.5-inch Desktop Hard Drive - OEM
Tuner: DD Cine C2/T2 V7 - Twin Tuner Card DVB-C/C2/T/T2 (PCI Express Card)

Total cost ~$1200
I picked a twin tuner card so that I am able to both stream live as well as record programs simultaneously.

Hardware install

Plugged in two outputs from a Hirschmann cable splitter & amplifier. Very high signal quality.



Added a power monitor to see how much power the unit consumes. It averages at 25W, 40W at peak.


Box in situ





Software configuration in TV Headend

Once I've put the above together I installed Ubuntu Linux 14.04 on the unit and read up on a wonderful program called TV Headend
http://tvheadend.org/


Because of the fact that Dutch cable companies encrypt their signals I have had to add a Smargo Smartreader which plugs into the USB port of the PC.
You can stick the cable company's smart card in the back of it so I receive the same packages as you would get with an ordinary set top box.


With a program called OSCAM you are able to decode encrypted channels via Conditional Access. http://www.streamboard.tv/oscam/

Here you can see the Linux box running TVHeadend & OSCAM



First you define the devices



Then a channel scan (this takes a while and may cause hassle when muxes are not correctly configured)



Out of the box TV Headend will ONLY SEND THE DIRECT MPEG STREAM. As you may realise, unless you have a fat pipe of broadband this will never look OK across the internet.

You'll end up with pixelation and frame drops, that is if you get any signal at all.

In order to "hack this" I have downloaded a special build which includes transcoding support and configured it as below:



There are a number of different profiles that I'm currently testing with and I have not determined what the final one will be.
For Matroska/H.264 the CPU load is quite high (35-40% for SD and 70% for HD) but the bandwidth smaller.
For Orbis/VP8 the CPU load is very reasonable (15-25% for SD and 40-50% for HD) but the bandwidth slightly bigger.

Not all devices like the Orbis format so for now I'm using Matroska mainly. By creating streaming profiles you can apply each profile to a different log in - I will explain later why this is useful.

As you can see the bitrate is being compressed from about 9mbit (HD) to 1.3mbit



Via the web interface of TVH you can now see channels and play them (via VLC)



Now I needed several different ways of receiving TV

#1 recording
#2 on my mobile
#3 on my HTPC

Recording

I can schedule recordings in TVH and dump them on my 3TB WD Red storage disk.
During night time hours I can schedule an rsync file transfer between my TV box in Europe and my HTPC in NZ.
This means I can view local European TV programs in full HD quality, native stream with 5.1 audio, less than 24 hours after they have aired.

Mobile viewing

For Android an app exists called TVHGuide. This can log in to TVH servers and stream, again with the same fundamental problem that the bit stream is far too large for a 4G signal.

In order to fix this I have created a tvhmobile user account and locked it to Orbis VP8 at a 384 pixel resolution. Now I can successfully stream TV wherever I am on the planet via 3G/4G!!





Here is a high resolution (1920x1080) screenshot of what the quality looks like:
http://www.scul.net/tmp/geekzone/tvhmobile_hq.png

HTPC viewing

On my HTPC I am a fond user of XBMC (now known as Kodi). Again, same problem as with the mobile it expects a full quality bitstream which is fine on a LAN but not when going internationally.
Again I hacked the streaming profile. Here I am using 576px on H264 which creates a bitrate of about 1.2~1.3Mb/s

Kodi can communicate with TVH via an add-on repository and can fully download the EPG and channel logos if defined.
The result is fabulous. laughing







I currently have the box installed near Amsterdam and am currently residing near London.
The stability and zap time of the system is phenomenal, it is similar to using a decoder set-top-box at home.

Now my next step is to attempt to find the perfect bitrate setting for streaming to New Zealand.
I may call in the help of some keen geeks here on GZ if you are willing to test international bandwidth streams from my box.


Hope you enjoyed reading through this guide

cool












Gigabit


Create new topic
2078 posts

Uber Geek
+1 received by user: 230

Subscriber

  Reply # 1215455 15-Jan-2015 12:44
Send private message

Very cool, well done.



455 posts

Ultimate Geek
+1 received by user: 107

Trusted

  Reply # 1215499 15-Jan-2015 13:48
Send private message

Thanks. I'm hoping this thread will be of help to other members who are looking to stream TV to their devices.

In theory, with a miniature set up that is similar you could stream TVNZ (from terrestrial cable or satellite) to your mobile.. if that would be worthwhile would be another matter laughing




Gigabit


1738 posts

Uber Geek
+1 received by user: 349

Trusted

  Reply # 1216239 16-Jan-2015 17:39
Send private message

Very nice .
Have you tested recovery from abrupt power down, etc ? UPS ?
Perhaps a simple checklist for your parents ?
You've invested a lot of time and planning, but would be a pain to support from half a world away if things go a bit awry.




My thoughts are no longer my own and is probably representative of our media-controlled government




455 posts

Ultimate Geek
+1 received by user: 107

Trusted

  Reply # 1216378 16-Jan-2015 23:01
Send private message

Yes I have thought of this, funnily enough, whilst I was staying there over the Christmas break the power went out (for the first time in 15 years!!)
I programmed the BIOS to re-power on AC power loss and everything just came back as normal.
Secondly, in case the router gets a different dynamic IP I have installed no-IP with a Linux client so that I can never get locked out.
Even if that were to happen, there is an internal static IP address that I can reach when logging into my dad's Windows PC via TeamViewer.
I would say that's pretty fail safe, but of course you never know.

This is also why I didn't opt for satellite. If there would be a storm and the dish would be knocked out of alignment I couldn't easily pop over to readjust it.
:)




Gigabit


Create new topic

Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.