keskiviikko 30. tammikuuta 2008

Installing HTPC software (part 1)

I'll start this one of with a quick and easy way to get samba file sharing working. If there are no interest in having such service, then you can skip over the Samba part. After the Samba installation I will install software that is needed for the HTPC functionality.

But first, here is a make.conf file that I am using. You may want to edit it to better suit your needs. It has basicly USE-flags enabled that "sound" like they might be useful in HTPC installation.

Before emerging samba, there is again a file in need of an extra line. This time easiest way to add it, is by running following command

echo "net-fs/samba acl -cups -doc -kerberos -ldap -oav pam -python -quotas readline -selinux winbind" >> /etc/portage/package.use

This will ensure samba will be emerged for just basic file sharing, with nothing too fancy like cups or ldap. Modify as needed. After the above line is added, just emerge samba. After all that is done, it is time to edit /etc/samba/smb.conf to suit your file sharing needs.

Here is a little example of how my smb.conf looks like

comment = Network Logon Service
path = /var/lib/samba/netlogon
write list = root

add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = Yes
domain master = Yes
local master = Yes
os level = 65
preferred master = Yes
security = user
workgroup = Workgroup Name
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
netbios name = Server name
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700

comment =
Yoursharehere is a shared directory
inherit acls = No
path = /
read only = No
browseable = Yes
writable = Yes
force user = yourusername

After the smb.conf is set up correctly, only thing left is to add samba users and their passwords. I use the following command to create first the user, then adding samba password to that user. Note that the username password should be preferable the same ones you use in your clients. That way a windows user can mount the share as a network drive by just using his own username and password. After adding the users, you are ready to start the samba service and add it to some runlevel, so it will start automatically on boot.

yourusername && smbpasswd -a yourusername

Enabling the Gentoo Portage Multimedia Overlay
Multimedia overlay is used to get the latest (and greatest) svn/cvs -versions of the multimedia programs like mplayer, which is used as the default video player in MMS. The reason we need the latest version is that it has multi-thread support enabled. This helps a lot when playing content that is encoded with H.264 with high definition resolutions. Playing 1080p material with h.264 encoding used to be pretty impossible with modest 3ghz dual core like mine. Nowadays with multithreading, it handles it pretty nicely.

This is how the overlay is enabled

mkdir /usr/local/portage
cd /usr/local/portage
rsync -rptvW rsync://
echo "PORTDIR_OVERLAY=\"/usr/local/portage\"" >> /etc/make.conf

HTPC software
Xineliboutput is a plugin to VDR, it is used to output the DVB-material via graphics card, either in X (vdr-sxfe) or in frame buffer (vdr-fbfe). Normal use case with VDR is that user has full feature DVB-tuner which has some kind of TV-out, but with high resolution flat panels this is hardly optimal. Instead we are going to use the DVI output on the graphics card to transfer the picture in HD resolution to TV´s HDMI input. Xineliboutput enables us to do just that. The plugin itself is loaded when VDR starts and the client (vdr-sxfe) is started whenever we select "Watch TV" from MMS main menu. And finally to the point: Xineliboutput requires xine-lib to be installed.

Besides xine library and mplayer we also need some codecs. W32codecs contains Microsofts decoders for codecs used in wmv-container (for example). We also should install x264-svn package. And lastly you can install MMS right here, without any extra steps, IF you are content (and smart) to use the stable version. I however, am going to go the extra mile and try out the new release candidate 1.1.0 version.

All of the above are installed by simply (mmsv2 installs at the time of this writing the stable version of the MMS) emerging the following

emerge xine-lib mplayer win32codecs x264-svn mmsv2

Disclaimer: While the Xineliboutput enables showing the DVB material in high resolution X environment, it does not actually do anything to make the picture better. You are still faced with the limitations of the source material, which is often low resolution and encoded with low bitrate. The upside is though that the DVB viewing with VDR can now be integrated as part of the X (the graphical interface) and more importantly part of the MMS.

Ei kommentteja: