The Raspberry Pi can be used in many ways. One of them: streaming a DVB signal into the network, e.g. to watch live TV in rooms without good DVB-T reception.
What you need for that: a Raspberry Pi, a DVB-T stick which is supported by Linux as well as a suitable client (if you don't want to use XBMC directly on the Raspberry) and a USB hubbecause the USB ports on the Raspberry do not supply enough power. In my case I use the solution to use my DVB-T stick with Mac-OS-X, where it is unfortunately not directly supported.
Meanwhile I have added the setup to DVB-C Support extended, because the cable connection is unfavorably located in the living room. This makes it easy to distribute digital cable TV in several rooms - at least if you restrict yourself to unencrypted channels. You don't even need many parts, the costs are mainly caused by the USB stick for DVB-T or even more expensive DVB-C. Most important is the Linux support, otherwise you will get a problem if you TVHeadend to use.
Shopping list for live TV with RaspberryPi
The following parts are required to implement this manual:
- RaspberryPi rev.B (35,- Euro at Amazon)
- Case for RaspberryPi (5,50 Euro at Amazon)
- 12 Watt USB power supply from Apple, as they work well (11,99 Euro at Amazon)
- Sundtek Media Pro III USB TV Stick (DVB-C, DVB-T, Analog, 89.90 Euro)
Installation of the DVB-T stick under Raspbian
Among other things I use a Terratec Cinergy HT USB XEwhich first of all lacks the appropriate firmware (compatible drivers are available for the Sundtek MediaTV Pro III). With a short Linux command (has to be executed on the console) you get a list of kernel messages - there you can also see which firmware file is expected:
~# cat /var/log/dmesg
At linuxtv.org there are the corresponding files, the suitable one is simply copied to /lib/firmware after a restart at the latest, the firmwares are loaded and the DVB-T stick can be used. The dmesg output should now show no errors or missing files related to the stick. In my case the final result looks like this:
dvb-usb: found a 'Terratec Cinergy HT USB XE' in cold state, will try to load a firmware dvb-usb: downloading firmware from file 'dvb-usb-dib0700-1.20.fw dib0700: firmware started successfully. dvb-usb: found a 'Terratec Cinergy HT USB XE' in warm state dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. DVB: registering new adapter (Terratec Cinergy HT USB XE) DVB: registering adapter 0 frontend 0 (DiBcom 7000PC)... xc2028 1-0061: creating new instance xc2028 1-0061: type set to XCeive xc2028/xc3028 tuner xc2028 1-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7 Registered IR keymap rc-dib0700-rc5 input: IR-receiver inside at USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/rc/rc0/input0 rc0: IR receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3.4/rc/rc0 dvb-usb: schedule remote query interval to 50 msecs. dvb-usb: Terratec Cinergy HT USB XE successfully initialized and connected usbcore: registered new interface driver dvb_usb_dib0700
Installation of tvheadend
tvheadend is a software that controls the DVB-Stick and provides the stream of the respective channel in the network. There is also an electronic program guide (EPG), the possibility to time recordings (only useful if a hard disk is connected to the Raspberry Pi is connected). For Raspbian there are ready-to-use tvheadend packages that can be easily installed using aptitude: this saves you the effort of compiling from source. Is tvheadend is installed and started, you can reach it under http://
Configuration of tvheadend
Before you can start using it, of course you first have to do a channel scan. Although there are region-specific defaults for the scan in tvheadend, in my case in Munich it only worked with the default value, which scans a larger spectrum.
In the end 33 channels were found, the superfluous ones that only refer to a media library are filtered out, so that you only get usable channels.
Using the play link you can either open the stream directly in your browser (if the VLC plugin is installed) or get a link to that particular stream which you can then open in VLC. This way you can check if the setup works correctly and if a live TV picture is transmitted.
Important: The time on the Raspberry Pi must be correct, otherwise there are problems with the electronic program guide (EPG). The simplest solution is to install ntpdate, which sets the correct date and time when the Raspberry is started (if an Internet connection is available).
tvheadend with DVB-C and DVB-T tuner
tvheadend is able to address several tuners. This offers several advantages: on the one hand, two clients can independently receive a different program (or you can record a different channel), on the other hand, reception weaknesses can be compensated (in my case, the channel DMAX over DVB-C works rather poorly, but over DVB-T it works without problems. The setup is simple: simply configure both DVB sticks, mapping the desired channels to the one you want to receive them from. The clients don't get anything from this but only a continuous channel list.
At first I was a bit skeptical that the Raspberry Pi could handle two demanding USB devices, but overclocked to 900 MHz this seems to be no problem. Also the parallel streaming to iPhone and iPad with two different channels works like this.
Clients for tvheadend
If you are using Windows, you can use a Plugins upgrade the support for tvheadend. Alternatively, XBMC can be used (e.g. also on a Android TV box like my ATV1200), a corresponding manual if you have set up tvheadend can be found for example here. XBMC can also run directly on the Raspberry so that a live TV picture is then output via the HDMI output.
For iOS devices I use the app Black Boxwhich, at 5.99 euros, is not one of the cheapest, but works together with tvheadend without any problems.
DVB-C with tvheadend: RTL in Munich
With the help of a Sundtek MediaTV Pro III is also DVB-C Support possible. On the one hand, this solves the problem that there is too long a distance between the cable termination and the TV set and that there are no suitable cables, and on the other hand, you will then again receive the channels of the RTL group in the Munich area. Since the Raspberry Pi does not have to display a video image itself but only passes on the information, the performance is sufficient for this. Somewhat surprising: it works both DVB-T and DVB-C in parallel with two USB sticks on the Raspberry Pi, you can even stream two channels simultaneously.
Apart from that, the solution already works very well, even though DVB-T is of course available in the other rooms without any problems - my first concern was to get a working setup. This was also possible without the Raspberry Pi clearly overclocked to have to.
For those who want even more performance for their home server or who want to run other services, this post is recommended: . Tvheadend runs on the Cubietruck the same way as on the Raspberry Pi, but doesn't use as much CPU power (but a little more power).
The FireTV box from Amazon should also support XBMC, anyway there is already a Instructions to that. FireTV with XBMC sounds like a good combination for a HTPC client, which can also act as a TV client for tvheadend. I will continue to follow this topic here in the blog in the future.