Showing posts with label Media Center. Show all posts
Showing posts with label Media Center. Show all posts

Sunday, April 19, 2009

Select which media center application to use

What HTPC /MCE / Media Center should you chose?

I was already using Vista and xp MCE and I use that as reference.

Vista
Can do almost everything including TV time-shift & recording
Takes no time at all to setup if you know ms win. Works with remote and everything out of the box.
You have to do some advanced tweaking to enable multiple rdp sessions. Crazy.
It takes a lot of power. Vista is heavy by it self and if you start MCE it is very slow. You need a modern computer. (3GHz + 2-3G RAM)
You need to pay. You shall not steal? I if you do, it is extra work anyway. 

MythTV
The most known system. Very advanced, has a frontend/backend setup which I like.
It support PVR and all kinds of TV functionality.
I tried the Mythbuntu installation CD. It worked ok out of the box, but I did not like it much. E.g. you have to type paths, no browse available. If you are going to test it you should probably know that Mythbuntu does not read media files directly from disk by default, it relay on the library. Change this setting unless you want to figure out how to load the library before you know if you have sound & picture. I could not get it to delete files from disk. I was intending to test a manual installation to learn more but moved on.
I never tried the TV functionality. 

Freevo
I have not tested it. It has PVR / TV functionality.
Of course the name is from Tivo.

Elisa
Gave it a quick test run only. It is a native gnome application and I think it could be very light weight. It is not finished yet and I could not get it to do much. Very easy to install since it is included in Ubuntu  default sw sources.
Could be the way to go in the future at least if you are running on a desktop computer and do some tasks with keyboard mouse. I mean library maintenance etc.

XBMC 
XBMC is now ported to linux and ready for use. Pre-compiled runtime is available for ubuntu which is a pre-req for me for the moment.

It looks and works great! It is working better better than Vista. E.g. in Vista you cannot delete a folder, no problem in xbmc.
It does not have PVR / TV functionality though. I understand it is possible to integrate with mythtv, this is not a prio for me right now. 

Compared to other applications it is working much better out of the box. However, you do not get the full package out of the box. Lirc has to be installed which is pretty easy if you know what you are doing but to get it to interact correctly with the OS takes some more work.

XBMC features not found in Vista
Delete folders
Resume video from where you stopped viewing
If playing video from a shared folder it works much better than in win. The player is buffering the file much better. On a good day it even works ok on wifi.

It is possibly a bit heavy on the HW but much less than Vista MCE and also a bit less than playing a video directly in the Vista desktop.  It does get the fan going though. I think it rates somewhere between XP & vista (ubuntu gnome + XBMC compared to win without MCE)


Popcorn
Popcorn is the most popular pre-built consumer media center. I have not tested it, but maybe I should?
I am not sure that using a PC as media center is the best way to go. It is loud and uses a lot of power. It is also expensive and to get it silent is more expensive.






Moving from win=>linux Media Center / HTPC

I have been using Vista Media Center for a while but I am now switching to a linux based system. I'm happy with Vista after some tweaks. (enable multiple rdp sessions etc). The problem is that if you for some reason do not want to pay, it requires some extra work and there is always the risk that the tweaks will contain virus. 

I was also using winxp MCE on an old laptop but xp stopped working after Christmas. The laptop cannot not handle vista media center and barely vista by it self.
This prompted me to finally make the move to Linux.

The problem is that I do not know Linux. I used unix back at the university but only learned ls, cd and a few other commands. Luckily I know other computer stuff  and I decided to give it a try.

I can tell you in advance it takes a LOOT of time if you are not an Linux expert. Yes, you can get Ubuntu to run in a hour, but to get to the level of vista mce out of the box takes a lot of work.

The good news is that the sw is great and I prefer it to vista when finally set up correctly.  





Saturday, April 18, 2009

Howto setup Remote for Ubuntu 8.04 XBMC with MS Remote

It is pretty straight forward to setup basic functionality but finding information is a nightmare.
The biggest problem was to get the shutdown to work with auto started irexec.

1) Remote control XBMC and other applications.
2) Start stop & kill XBMC with remote
3) Shutdown computer
4) Autostart irexec

Basic setup

The first step is to install and configure LIRC.

sudo apt-get install -y lirc
Select windows media center remotes (New version)
IR Transmitter: Select “none”

run irw in terminal and press any button on the remote, the name of device and button should show on screen.

This is pretty much it if you have a standard remote. I have had no problem with MS MCE Remote. You should now be able to control XBMC.

To control other applications you have to create your own button => function mappings.
This is stored in the .lircrc file in ~/.

This is best done by using the lirc generator from the mythbuntu team.

sudo apt-get -y install mythbuntu-lirc-generator
run
mythbuntu-lircrc-generator
and you will get the lircrc files for the most common applications.

Totem is the standard player in Ubuntu 8.04, it is supported by this setup but first you need to enable the remote plugin from within the player.


Advanced setup
Download files & scripts here.

Setup start stop & shutdown
Most of this is from http://xbmc.org/forum/showthread.php?t=30230. Some changes was necessary though.

We need irexec to do this and for good measure we setup irxevent as well. The latter is used to send keyboard commands. (ctrl-s etc)

install irxevent
sudo apt-get -y install lirc-x


create file named irexec in ~/.lircrc
Add:

# Start XBMC
begin
prog = irexec
button = Home
config = ~/scripts/startXBMC.sh &
end

# Kill XBMC
begin
prog = irexec
button = Red
config = ~/scripts/killXBMC.sh &
end


#shutdown
begin
prog = irexec
button = Power
config = ~/scripts/shutdown.sh &
end

The '&' is necessary at least in my setup, otherwise the startXBMC will loop in the background and when I exit XBMC it is restarted several times.
I found the solution here http://xbmc.org/forum/showthread.php?t=30230.

Create an empty file named irxevent in ~/.lircrc
It will contain the mappings for irxevent. I am not using it for the moment. I wanted to send ctrl-alt-Delete, but could not get it to work.

Add
include ~/.lirc/irexec
include ~/.lirc/irxevent
to the ~.lircrc file

echo  "include ~/.lirc/irexec" >>  ~/.lircrc
echo  "include ~/.lirc/irxevent" >>  ~/.lircrc



The next step is to create the script files.
Pick them up at http://xbmc.org/forum/showthread.php?t=30230.
Worked fine for me, I replaced /home/youruser/ with ~/ when possible. I think the remaining hardcoded usernames can be removed by following the comments further down in the thread (pidof?). I guess killall would also do the trick.

To autostart the irexec (and irxevent) add
/home/username/scripts/startIRexec.sh
to system/preferences/sessions. NB: ~/scripts does not work here.

First test to start manually from terminal
~/scripts/startIRexec.sh

Run it twice and you should see that the script kills the old processes before the new is started.
ps -C irexec
should show one irexec process after two runs.

Now you should be able to start and kill XBMC. Kill should only be used when XMBC cannot be closed down the normal way I think.
Please note that I have mapped Power button to shutdown, when shutdown is finally working it will make it impossible to use the Power button to exit XBMC without shutting down the computer. The mapping can be changed in the irxec file. I think it can also be fixed by using mode in the lirc files to separate the applications.


Now to the shutdown..
I use
sudo /sbin/shutdown -h now
in the shutdown script. We can't have the script asking for password and this is fixed by editing the /etc/sudoers file. It is edited with this command:
sudo visudo.

First make backup
cp /etc/sudoers /etc/sudoers.org


This is where we hit the wall. The correct way(?) to do this is to add the line
youruser ALL=NOPASSWD: /sbin/shutdown
at the end of the sudoers file.

It worksfine if you start irexec manually from the terminal.
But after reboot and autostart shutdown does not work, everything else works fine.

I finally found a solution/ workaround.
add
%admin ALL=NOPASSWD: /sbin/shutdown

I am aware this is not a good setup, but it will have to do for a while. Can anyone help?



If you find this guide helpful let me know. I would be willing to re-write it with some quality if anyone needs it.