Forums » Tutorial and setups »
[XBMC/TVH 3.0] How to setup XBMC with TVHEADEND
Added by Seven NL about 12 years ago
This is a sort of journal on what i did to setup XBMC with TVHEADEND.
Because i struggled for a week or more to get to the point i actually could view TV I thought i share this so you could get your setup up and running a bit faster.
********************************************************
This howto is most a reminder for myself how to install and update/setup xbmc as pvr and getting the information off various websites, i wanted to centeralise this infomation.
Thanks go out to the following people that helped me make this possible by either there information and howto's or direct support.
Adam Sutton : for support on installing tvheadend.
The XBMC team for an excelent HTPC backend. You guys just rock!
Tvheadend team for a fast and easy to manage PVR frontend.
Marcin for writing an excellent howto on installing and configuring XBMC with Tvheadend.
The people at Tuxera for NTFS-3g and a simple and smooth install guide.
The folks over at Pulse-Eight for the PVR implementation into XBMC.
Everyone i missed in this list,your hard work is appreciated.
(Goal)
A fast Media center which holds my movies and music and watch HD satellite TV in one box.
Dual boot for Windows and XBMC ( dual boot screen only will have 2 options : Windows or Linux )
Able to read and write onto a NTFS partitioned disc which will hold my media, Timeshift and recordings.
(The Hardware)
MSI MS-7529 motherboard with a 1.8Ghz Core 2 Duo, 2 GB DDR2 RAM, Asus GT610 with 1.4 HDMI, Technisat Skystar 2HD, 80GB 2.5" HDD.
A 2TB disc will be added as media disc ( formatted with NTFS ).
(Starting point)
I have a 80GB 2.5" laptop disc (which will be changed to a SSD as soon all software is working correctly)
Made a 50GB partition for windows 7 and installed Windows.
Using Putty as an SSH shell from my gaming machine to do all the command-line stuff, if you do not have this option press "CTRL+ALT+F1" to get in another session and log in with your chosen username and password.
(Installation of the software)
I start off with installing the latest XBMCbuntu (version 11.0 ) installing on a second partition to boot next to Windows.
Flip in the disc or use a USB stick which should be bootable.
At the installation screen i choose "install Unbuntu" on the next screen i tick "Download updates while installing" to get the latest software installed.
At the Installation type screen i choose "Something else" select free space and click "Add", I added 24GB for an ext4 partition with "/" as mount point. The left over 2.3GB i used as an swap partition.
Fill out the "Where are you? " and "Keyboard layout" for your needs.
"Who are you?" screen i used "xbmc" as user and "xbmc" as password. Computer name "HTPC" and log in automatically.
Don't encrypt your home-folder as it will waste resources (CPU time).
With Windows installed it will give you a screen to import accounts from the windows partition.
I did not add any, choose them if you want them but they are not needed and make the /home cluttered.
After the installation has finished and the mandatory reboot done, you be booting into XBMC.
Do not alter anything yet as we going to replace this XBMC version to one with PVR support.
(Command shell or remote login)
To use the command shell on your XBMC box press: CTRL+ALT+F1 and login as the user you entered at the installation.
Remote login makes life easier as you can lookup webpages and copy/paste commands and links with ease.
I login remotely using PuTTY with an SSH connection.
To have the correct settings is key here is what you need to set:
Under Terminal/Keyboard: the function keys and keypad set to Linux.
Under Window: I set my Colmns to 150 and Rows to 50 for a bigger screen at startup.
Under Window/Appearance: Have Clear Type as Font quality.
Under Window/Translation: Remote character set has to be UTF-8 or Midnight Commander will look awful.
Make sure you save these settings for later use.
(So what kind of Linux are we running exactly ?)
Enter command: cat /etc/*-release (to see Unbuntu's release which in my case is 11.10)
Enter command: uname -m ( is it 32bits(i386) or 64bits(i686)
In my case 64bits.
The very first thing i do is to install Midnight Commander, it is a helpful tool for windows users and has the easiest text editor on-board to my opinion.
Enter command: "sudo apt-get install mc" and let the installation run, then start it up to see what it is/does by typing "mc".
Just type : "touch testfile", yes you still can issue commands, and it will make a empty file in the directory that is selected.
Browse to that file and press the "Edit" button at the bottom, you will get (one time only per account) the question which editor to use, i choose /usr/bin/mcedit ( even if the program says nano is easier, for windows user mcedit rocks ).
Press Quit (F10) to return to MC, delete the "testfile" press "Quit" (F10) to exit MC.
- Somehow not all function keys work with PuTTY and MC, be aware of that **
(NTFS read/write support)
Time to install the NTFS support for Linux using NTFS-3g.
Now I noticed some compiling errors when do this as user xbmc and the sudo command, so i will enable the root account and login as root to install this package.
First activate root : sudo passwd root ( use a different password for the root account )
the change into root : su -
You should see now that command-line should say root@HTPC:~#
Reminder : as root you don't need to use the sudo command as you have FULL admin rights.
Grab the latest copy with the wget command : wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2012.1.15.tgz
Unpack it: tar xzf ntfs-3g_ntfsprogs-2012.1.15.tgz
change directory: cd ntfs-3g_ntfsprogs-2012.1.15
Execute command: ./configure
Execute command: make
Execute command: sudo make install
watch the screen for eventual errors, consult the website of tuxera.com for information.
I didn't had any errors ( a warning is not an error ) so my install is setup and ready to be used.
At http://www.tuxera.com/community/ntfs-3g-download/ you find how to use it, a few command i use:
fdisk -l (command to list all partitions, search for system :HPFS/NTFS/exFAT partition(s) the /dev/xxxx are the mount points you need)
Manual mount : mount -t ntfs-3g /dev/sda1 /mnt/media (/dev/sda1 is an example)
Add as last entry in /etc/fstab: /dev/sda1 /mnt/media ntfs-3g defaults 0 0
Type: exit to return to your xbmc account. (xbmc@HTPC:~$)
(Updating your Nvidia software)
I do this just to be sure i have the latest Nvidia drivers installed.
Enter command : sudo apt-get install nvidia-current-updates
I didn't had the Kernel modules so for me it was a must.
(upgrading XBMC to XBMC with PVR support)
The XBMC installation currently doesn't support PVR support out of box (this will change as of version 12) so we need to upgrade XBMC to a version with PVR support (these build are still very beta you've been warned).
Let's get the latest build from Pulse-Eight.
Enter command: sudo add-apt-repository ppa:pulse-eight/pulse
Enter command: sudo apt-get update
Enter command: sudo apt-get install xbmc xbmc-bin
I am using the 3.0 .deb file until the beta 3.2 release is online.
- Packaging installation ***
First we need some required libraries installed.
Enter command: sudo apt-get install build-essential git libssl-dev
Enter command: sudo apt-get install libavahi-client-dev (Optional but we have room to spare)
Enter command: wget https://github.com/downloads/tvheadend/tvheadend/tvheadend_3.0_amd64.deb (or the /tvheadend_3.0_i386.deb file if you run a 32 bits linux version)
Enter command: sudo dpkg -i tvheadend_3.0_amd64.deb
- Tvheadend 3.2 beta ***
No files available
Yes, we have our important software installed, let's reboot the XBMC box to verify.
Enter command: sudo reboot now
After the system reboot let's look at the xbmc build.
Goto "System/System info" (a good place to check your CPU level(s) when adding applications to the system).
Mine tells me XBMC 11.0 GIT:Unknown (Compiled: Sep-14-2012)
Now we are here let's setup the basics.
Press "ESC" and select "System.
At the Appearance/Skin screen i like to disable the RSS feed, if you have a strong CPU you can leave it on.
At the Appearance/International: screen Set the setting to your liking, be sure to set "Region" correctly.
I really dislike the Visualization plugins shipped with XBMC (and regretfully not uninstallable) so under Appearance/Screensaver: I disable "Use visualization if playing audio".
At Video/DVD: I enable "play DVDs automatically: and :Attempt to skip introduction before DVD menu".
At Music/Playback: I set Visualization to NONE.
At Weather: setup your location, don't forget to click OK or your setting will not be saved.
At Add-ons: I remove the disabled add-ons first (a clean layout is a good layout) "Yahoo Music Videos" plugin can't be removed regretfully.
At System: setup your Video and audio, I also have to use Video Calibration to make XMBC fit onto my LCD TV.
(Tvheadend configuration setup)
For tvheadend we need that 2th computer.
Open a browser, type the ip address of the XBMC box followed by :9981, if you install was correct you should get a username/password box.
Enter your chosen combination (mine is xbmc/xbmc) and you will be presented by the web-interface of tvheadend.
Click on the About tab to find out what version you are running, mine tells me 3.0.
So let's setup tvheadend for my hardware, a satellite receiver connected to a DiSEqC multiswitch controlling 4 LMB's.
Click on the Configuration tab and select the TV adapters tab, we are on the "General" tab.
From the dropdown box called "Select TV adapter..." my only selection is "STB0899 Multistandard".
You see the screen change with information headed by: Tools - Adapter configuration - Information and capabilities.
Under Adapter Configuration I change the "Adapter name" to Skystar 2HD, make sure "Autodetect muxes" and "Idle scanning" are enabled and press save, we will come back to this screen.
I need to goto the "Satellite config" tab to setup my four LMB's.
I rename "Default (Port 0, Universal LNB)" to Astra 19.2E keep the "Switchport" on 0(zero) LMB type i use are Universal and change the comment "Default satconf entry" to "Astra 19.2E".
Click "Add entry" and add the 3 other LMB's, Astra 28.2E, Astra 23.5E and Hotbird 13.0E changing the "Switchport" setting for every LMB.
Like:
Astra 19.2E -> 0
Astra 28.2E -> 1
Astra 23.5E -> 2
Hotbird 13.0E -> 3
Press "Save changes"
A good practice is to press F5 ( reload the page ), the screen will be back to the initial state.
Click on the "Configuration" tab again and we are back at the "General: settings tab.
The "Select TV Adapter" dropbox will now have your renamed adapter, select it.
Now we are going to "Add DVB Network by location" under Tools.
Press the + sign to see the complete list under "Geosynchonous Orbit", I select "Astra 19.2E" and from the "Select satellite configuration" dropbox on the same window I select "Astra 19.2E" and press "Add DVB network".
We need to do this for every LMB we have, so I be doing this 3 times more, but selecting the right DVB network for the selected LMB.
Now I issue the command :sudo /etc/init.d/tvheadend restart
This will restart the scanning of ALL muxes again because we didn't save any channels, why you ask ?
Well, At the time of writing this the source of which tvheadend gets his satellite information has faulty data as well tvheadend will scan my 4 satellites in one go, so i can go and do something useful while it scans.
Tip: When getting errors scanning Multiplexes disable the faulty frequencies, restart tvheadend with the command mentioned above.
This document is still a work in progress and likely to change.