Friday, 14 January 2011

Kaffeine Forum :: View topic - Sasc-ng and CCcam.

Kaffeine Forum :: View topic - Sasc-ng and CCcam.: "Someone sent me a private message asking my help about getting CCcam to work with Sasc-ng i remember i had a
very frustrating problem to get CCcam to replay Sasc-ng requests although CCcam protocol support was added to sasc-ng.
so i thought i would post here for everyone who is having the same issue.

To install sasc-ng take a look at my other post here : http://hftom.free.fr/phpBB2/viewtopic.php?t=532
I will be using vdr-sc HG Repositor from this URL http://85.17.209.13:6100/sc for this post.
to download it just run this command in your shell
Code:

hg clone http://85.17.209.13:6100/sc

After installing sasc-ng as mentioned in the above post. cd to ./sc/contrib/ in the folder downloaded from the repositer
above. then run this command :

Code:

make


if everything worked as it suppose to you will get a library cccam_ca.so
cp that library somewhere you are gonna use it from. let's say /usr/local/lib/ for example.

Code:

cp cccam_ca.so /usr/local/lib/


now download latest CCcam version from here : http://www.cccamforum.com/forums/download/index.php?dir=CCcam%20Emus/

in the archive there is gonna be 6 different executable files CCcam.something each one for a different type of processor
a CCcam configuration file CCcam.cfg and a change log file ChangeLog.
for example i have a x86_64 linux machine.
so i will copy CCcam.x86_64 to one of my binary directories. let's say /usr/local/bin/

Code:

cp CCcam.x86_64 /usr/local/CCcam


copy the CCcam configuration file to /var/etc/ that's where CCcam will search for it you can use any other directory.
unless you specified the configuration file path with the CCcam switch -C .
Code:

cp CCcam.cfg /var/etc/


Download CCcam.channelinfo and CCcam.providers from the following links:
http://www.cccamforum.com/forums/download/files/CCcam%20Tools/CCcam.channelinfo
http://www.cccamforum.com/forums/download/files/CCcam%20Tools/CCcam.providers

copy CCcam.channelinfo CCcam.providers to the same directory where your CCcam.cfg is located normally /var/etc/

if you are gonna use softcam.key or need to use it you will have to download the following files:

http://hacksat.org/deneme6.php?file=SoftCam.Key
http://hacksat.org/deneme6.php?file=AutoRoll.Key
http://hacksat.org/deneme6.php?file=constant.cw

then copy the three of them to the directory /var/keys/ that's where CCcam will them from.

now you can start CCcam with the following command

Code:

LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/CCcam


or you can use a startup script like this one i wrote.

Code:

#!/bin/sh
#
start()
{
if ps -C CCcam > /dev/null
then
echo -e 'CCcam already running\n'
exit
fi
rm /tmp/.CCcam.nodeid > /dev/null
rm /tmp/camd.socket > /dev/null
sleep 2
echo -e 'Starting cccam.\n'
LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/CCcam $1
}

stop()
{
echo -e 'Stopping cccam.\n'
killall CCcam
rm /tmp/.CCcam.nodeid
rm /tmp/camd.socket
}

case $1 in
start )
start
;;
stop )
stop
;;
restart )
echo -e 'restarting cccam.\n'
stop
sleep 1
start
;;
nodaemon )
start -d
;;
* )
echo -e 'Usage `basename $0` {start | stop | restart | nodaemon }\n'
;;
esac




you can customize it to fit your need depending on which Linux distribution you are using.

now let's add our newly installed CCcam server to Sasc-ng card client configuration file. and here it comes the tricky part.
depending on what directory you have chosen for your sasc-ng --cam-dir option.
you should have a file named cardclient.conf there.
to connect your sasc-ng to your newly installed CCcam. add the following like the file cardclient.conf mentioned before.

Code:

cccam:127.0.0.1:9000:0/ffff:/tmp/camd.socket

now you will notice that your CCcam doesn't answer your sasc-ng requests or sasc-ng doesn't send the proper requests
to solve this problem you have to specify the provider you are gonna decrypt. to do so open the CCcam.providers file you have
installed before and search for the provider name you need to decrypt for example let's say we are gonna decrypt Cyfra+
there is a line like this 01000065 '[S2] Cyfra+ (13E)[Full]' in the file CCcam.providers what we need is the hexadecimal
eight characters number 01000065 we will split it into two parts each one with four characters like this 0100 and 0065
now let's add it to our sasc-ng cardclient.conf configuration file. which will now become like this :
Code:

cccam:127.0.0.1:9000:0/ffff:0100/ffff:0065/ffff:/tmp/camd.socket

you can add as many providers as you need just make sure you will do the same thing for each provider here is the configuration i'm using for my CCcam server in the cardclient.conf file.
Code:

cccam:127.0.0.1:9000:0/ffff,0100/ffff,0604/ffff,0500/ffff,1702/ffff,1815/ffff,0d02/ffff,0919/ffff,1801/ffff,2111/ffff,2011/ffff,0000/ffff,0D03/ffff,0D00/ffff,0030/ffff,0091/ffff:/tmp/camd.socket

After you make any changes to the cardclient.conf file you have to restart your sasc-ng to apply them.The only thing left that i didn't cover in this post is how to configure CCcam to connect to your Cams if you have any. I don't have any Cams because i use CCcam just for softcam so i can't give you any details about how to do that but i think there should alot of other tutorials online about how to do that.

- Sent using Google Toolbar"

Thursday, 25 November 2010

Sasc-ng and CCcam

Someone sent me a private message asking my help about getting CCcam to work with Sasc-ng i remember i had a
very frustrating problem to get CCcam to replay Sasc-ng requests although CCcam protocol support was added to sasc-ng.
so i thought i would post here for everyone who is having the same issue.

To install sasc-ng take a look at my other post here : http://hftom.free.fr/phpBB2/viewtopic.php?t=532
I will be using vdr-sc HG Repositor from this URL http://85.17.209.13:6100/sc for this post.
to download it just run this command in your shell
Code:

hg clone http://85.17.209.13:6100/sc

After installing sasc-ng as mentioned in the above post. cd to ./sc/contrib/ in the folder downloaded from the repositer
above. then run this command :

Code:

make


if everything worked as it suppose to you will get a library cccam_ca.so
cp that library somewhere you are gonna use it from. let's say /usr/local/lib/ for example.

Code:

cp cccam_ca.so /usr/local/lib/


now download latest CCcam version from here : http://www.cccamforum.com/forums/download/index.php?dir=CCcam%20Emus/

in the archive there is gonna be 6 different executable files CCcam.something each one for a different type of processor
a CCcam configuration file CCcam.cfg and a change log file ChangeLog.
for example i have a x86_64 linux machine.
so i will copy CCcam.x86_64 to one of my binary directories. let's say /usr/local/bin/

Code:

cp CCcam.x86_64 /usr/local/CCcam


copy the CCcam configuration file to /var/etc/ that's where CCcam will search for it you can use any other directory.
unless you specified the configuration file path with the CCcam switch -C .
Code:

cp CCcam.cfg /var/etc/


Download CCcam.channelinfo and CCcam.providers from the following links:
http://www.cccamforum.com/forums/download/files/CCcam%20Tools/CCcam.channelinfo
http://www.cccamforum.com/forums/download/files/CCcam%20Tools/CCcam.providers

copy CCcam.channelinfo CCcam.providers to the same directory where your CCcam.cfg is located normally /var/etc/

if you are gonna use softcam.key or need to use it you will have to download the following files:

http://hacksat.org/deneme6.php?file=SoftCam.Key
http://hacksat.org/deneme6.php?file=AutoRoll.Key
http://hacksat.org/deneme6.php?file=constant.cw

then copy the three of them to the directory /var/keys/ that's where CCcam will them from.

now you can start CCcam with the following command

Code:

LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/CCcam


or you can use a startup script like this one i wrote.

Code:

#!/bin/sh
#
start()
{
if ps -C CCcam > /dev/null
then
echo -e "CCcam already running\n"
exit
fi
rm /tmp/.CCcam.nodeid > /dev/null
rm /tmp/camd.socket > /dev/null
sleep 2
echo -e "Starting cccam.\n"
LD_PRELOAD=/usr/local/lib/cccam_ca.so /usr/local/bin/CCcam $1
}

stop()
{
echo -e "Stopping cccam.\n"
killall CCcam
rm /tmp/.CCcam.nodeid
rm /tmp/camd.socket
}

case $1 in
start )
start
;;
stop )
stop
;;
restart )
echo -e "restarting cccam.\n"
stop
sleep 1
start
;;
nodaemon )
start -d
;;
* )
echo -e "Usage `basename $0` {start | stop | restart | nodaemon }\n"
;;
esac




you can customize it to fit your need depending on which Linux distribution you are using.

now let's add our newly installed CCcam server to Sasc-ng card client configuration file. and here it comes the tricky part.
depending on what directory you have chosen for your sasc-ng --cam-dir option.
you should have a file named cardclient.conf there.
to connect your sasc-ng to your newly installed CCcam. add the following like the file cardclient.conf mentioned before.

Code:

cccam:127.0.0.1:9000:0/ffff:/tmp/camd.socket

now you will notice that your CCcam doesn't answer your sasc-ng requests or sasc-ng doesn't send the proper requests
to solve this problem you have to specify the provider you are gonna decrypt. to do so open the CCcam.providers file you have
installed before and search for the provider name you need to decrypt for example let's say we are gonna decrypt Cyfra+
there is a line like this 01000065 "[S2] Cyfra+ (13E)[Full]" in the file CCcam.providers what we need is the hexadecimal
eight characters number 01000065 we will split it into two parts each one with four characters like this 0100 and 0065
now let's add it to our sasc-ng cardclient.conf configuration file. which will now become like this :
Code:

cccam:127.0.0.1:9000:0/ffff:0100/ffff:0065/ffff:/tmp/camd.socket

you can add as many providers as you need just make sure you will do the same thing for each provider here is the configuration i'm using for my CCcam server in the cardclient.conf file.
Code:

cccam:127.0.0.1:9000:0/ffff,0100/ffff,0604/ffff,0500/ffff,1702/ffff,1815/ffff,0d02/ffff,0919/ffff,1801/ffff,2111/ffff,2011/ffff,0000/ffff,0D03/ffff,0D00/ffff,0030/ffff,0091/ffff:/tmp/camd.socket

After you make any changes to the cardclient.conf file you have to restart your sasc-ng to apply them.The only thing left that i didn't cover in this post is how to configure CCcam to connect to your Cams if you have any. I don't have any Cams because i use CCcam just for softcam so i can't give you any details about how to do that but i think there should alot of other tutorials online about how to do that.

Tuesday, 13 April 2010

RouterTech • View topic - Allow WOL through Router

RouterTech • View topic - Allow WOL through Router

I setup my speedtouch 780 to accept/forward WOL packest to my Home PC from Work..

I believe that the BT HomeHub is a speedtouch 7G and configuring it is basically the same, although I can't confim it.

From memory All I had to do was
Telnet into the Speedtouch.
and at CLI execute

:ip arpdelete intf=LocalNetwork ip= hwaddr=

:ip arpadd intf=LocalNetwork ip= hwaddr=

This creates a static arp entry otherwise the Speedtouch seams to forget where the PC is conncted.

then execute

:service rule add name="Wake on LAN" protocol=tcp portrange=7-9
:service rule add name="Wake on LAN" protocol=udp portrange=7-9
:service assign name="Wake on LAN" host= log=disabled

These last 3 can be setup from the web interface "Game & Application Sharing" if prefered.

Details on how to send the WOL packet can be found here
http://www.depicus.com/wake-on-lan/woli.aspx

The PC will also need to be setup with a static IP Address or to always get the same address from DHCP.

Hope this helps

Monday, 25 January 2010

Upgrade Alsa

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.20.

sudo /etc/init.d/alsa-utils stop

cd ~
rm -rf ~/alsa* ~/.pulse*


sudo apt-get update
sudo apt-get upgrade

sudo apt-get install wget build-essential linux-headers-`uname -r`
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2
tar -xf alsa-driver-1.0.21.tar.bz2
cd alsa-driver-1.0.21
./configure
make
sudo make install
sudo ./snddevices
sudo apt-get install alsa-utils
#Reboot Here!!!
alsamixer
sudo alsactl store

other link is

http://monespaceperso.org/blog-en/2009/10/29/upgrade-alsa-1-0-21-on-ubuntu-karmic-koala-9-10/

Monday, 11 January 2010

Multimedia Keys - Gentoo Linux Wiki

Multimedia Keys - Gentoo Linux Wiki

skystar HD 2 for Mythbuntu - Ubuntu Forums

skystar HD 2 for Mythbuntu

now 9.10 is out the procedure changed a bit....
Have fun.


sudo -s
apt-get install libncurses5-dev hg-buildpackage
cd /usr/local/src
hg clone http://mercurial.intuxication.org/hg/s2-liplianin
cd s2-liplianin
cd linux/include/linux
ln -s /usr/src/linux-headers-`uname -r`/include/linux/compiler.h ./
cd ../../../
make menuconfig
unselect the folowing module:
multimedia support-> DVB/ATSC Adapter -> Firetv/Floppydtv
make
make install
depmod -a
reboot (might be an other way of restarting services but this was fast enough.. )


did not do it myself.. just a gatherer.....

http://www.eurocardsharing.com/f273/...ltiproto-63073
http://www.linuxtv.org/wiki/index.php/Azurewave_AD_SP400_CI_(VP-1041)
https://help.ubuntu.com/community/Re...ts/PlayingDVDs
https://bugs.launchpad.net/ubuntu/+bug/440117

Monday, 28 December 2009

Mgcamd to update sky card

Pre-requisites
White XlyCard originally paired in Xlybox
Box key generated and inserted into newcs.xml
newcs up and running in card server or dreambox.
Mgcamd to be installed on dreambox.
Omnikey card reader installed in server (or dreambox ?)


1. Install mgcamd 1.30a/b/c/d or 1.31 and mgcamd config on your dreambox
mg_cfg /var/keys
newcamd.list /var/keys
softcam.key /var/keys
Autoroll.key /var/keys
priority.list /var/keys
mgcamd.bin /var/bin



2. Check /var/keys/mg_cfg settings
A = 01
G = 03 (some people use 1)


3. Edit newcamd.list (or use B16MCC’s excellent config, newcs & .list generator)
CWS = yournewcsserverip your newcs port dummy1 dummy1
01 02 03 04 05 06 07 08 09 10 11 12 13 14 lan newcs


4. Add new user with webinterface to your newcs server or just
paste it to newcs.xml

dummy1
dummy1


on
off
off
0
access



5. Ensure newcs.xml has auto update (au) enabled
No
No
No


6. When your card entitlements need to be updated you
Switch default cam on your dreambox to mgcamd
(blue button followed by arrow left or right to find mgcamd, followed by OK when you've found it)


7. Force entitlement updates by tuning dreambox to a BSB channel you don't have access to with your local card eg Racing UK (some people have just used sky Sports 1)


8. Let dreambox and server run all night and then check via Newcs web interface to see if card entitlements are up to date (may take 3 days so patience is required!)

How To Setup A Linux PC Card Server - Satellite TV support forum & Digital TV support forum.

How to setup a Linux PC Card Server.

Prerequisites :-

1. A networked PC that has no real purpose in life.
2. A clean install of ubuntu desktop edition. ( _http://www.ubuntu.com/GetUbuntu/download )
3. Configured telnet access to ubuntu.
4. Configured FTP server on ubuntu.
5. Omnikey 3121 USB card reader. ( _http://www.omnikey.com )
6. 1 - 2 spare hours.



I'm not going into the initial setup of Ubuntu , telnet or FTP as there are many places you can find help with that. Its dead easy !

At this point I should mention that much of this setup is done using command line instructions, in my case executed from my mac via telnet. You can of course use putty in windows or do it locally on the ubuntu machine in a terminal window. I wll not stipulate the difference between these options, thats up to you.



Required Software :-

NewCS
CCcam
PCSCd
pcsc-tools
Omnikey Driver

To install the required components simply type the following, enter your password and answer the prompt with 'yes'

sudo apt-get install pcscd
sudo apt-get install pcsc-tools


Omnikey Driver
_http://www.omnikey.com/index.php?id=69&rName=CardMan%203x21%20PC/SC%20CCID%20for%20Linux%2032%20Bit&did=69
New
_http://www.hidglobal.com/driverDownloads.php?techCat=19&prod_id=188

This is a tarball I believe they're known as, its an archive basically, I unpacked it on my mac and then just FTP'd the unpacked folder to the ubuntu desktop. You can use Winrar also to unpack it or I'm sure there's a way in linux too.

Again in telnet, navigate to the unpacked folder and install by typing

./install

Once you have everything installed you can test the card reader for a response. Simply type

pcsc_scan

Code:
b16mcc@b16mcc-desktop:~$ pcsc_scan
PC/SC device scanner
V 1.4.14 (c) 2001-2008, Ludovic Rousseau
Compiled with PC/SC lite version: 1.4.99
Scanning present readers
0: OmniKey CardMan 3121 00 00
If your card is not in the database it tells you the command to use to update that database. I needed to do that and afterwards it knew my card. This is not essential however for it to work, just nice to see !

Code:
Possibly identified card (using /home/b16mcc/.smartcard_list.txt):
3F FD 13 25 02 50 00 0F 33 B0 0F 69 FF 4A 50 D0 00 00 53 59 02
Sly Digital (DSS satellite TV card) 2009 issue
Install and setup NewCS.
Ok so via FTP lets setup some files and folders. By default the home directory of your FTP server will be /home/username/

In that folder I made a new folder, NewCS. I did this using my FTP software.
Now lets put the files we need in those folders.

Sticking with just NewCS for now, we'll add CCcam later.
In /home/username/NewCS you need :-
newcs.i686.pcsc
newcs.xml

If you like you can now rename your newcs.i686.pcsc , I called it newcs_167

Ok, next we need to edit the newcs.xml file to read our card using our Omnikey reader. Here's my config with a few personal details removed. This is exactly my config it does work.

Code:



Omnikey
pcsc
368
0
odd
normal
Yes
Yes
01020304
No
No
Yes
Yes
Yes
12010
Yes
round



No
10001

localhost



20
-1



8080
yes


admin
admin
admin



NewCSpwd
simple
internal
all
console,tcp
1001
normal,init


Yes
newcs
01 02 03 04 05 06 07 08 09 10 11 12 13 14

CCcam
CCcam
on
off
No
1




Once thats in place and we're happy we've had a good output from pscs_scan we can go ahead and run NewCS for the first time. Just one more thing though, NewCS has a default location where it expects to see the newcs.xml file, we of course are using a custom location so we need to tell it that. Run NewCs by typing this :-

./newcs_167 -C /home/username/NewCS/newcs.xml

The -C switch simply means use this location for the config. You can see all switches by using -h for help.

So, thats it she's running. You should now be able to open up the web browser and see your card. In your address bar type in :-

_http://dreamboxip:8080

Enter your user name and password and you're in. Have a click around the different options on the left and you should see your card.

To stop NewCS simply type in your telnet session :-

killall newcs_167

Now, its a little long winded typing that startup command with the great big -C switch so we'll make a tiny script file to do it for us.

Code:
#!/bin/bash
cd /home/username/NewCS
./newcs_167 -C /home/username/NewCS/newcs.xml
Save this file as startnewcs.sh in your /home/username folder

Now to start NewCS you can simply type :-

./startnewcs.sh

This is a very very simply way of doing it, but it works. If someone out there is a linux god then maybe you can retort here and show us how its done properly. Cheers.....

So now that the server is up and running lets connect to it from CCcam. Simply add this line to the CCcam.cfg in your Dreambox.
Code:
N: 192.168.100.100 12010 CCcam CCcam 01 02 03 04 05 06 07 08 09 10 11 12 13 14
Where 192.168.100.100 is the IP address of your new linux server.
You'll notice the port number 12010 matches with the parameter and the user and pass match with the parameters.

As normal if you want to access this from outside your LAN then you'll need to forward port 12010 in your router to the Linux PC IP address and replace the IP address in the N: line with your WAN IP or your DNS address.

Ok so that enough for now, I'm going bog eyed. Oh just one thing, all the files and folders we have FTP'd or created, just make sure you CHMOD them all to 755 to ensure they have the correct permissions. Things can be a little confusing when you don't do this.

Guys, some of this I've done from memory so if there's anything thats troubling you I'm sure you'll comment and I'll be happy to help.

I'm pretty sure you can setup the CCcam server too using this basis but if anyone wants it adding to this tutorial then please ask and I'll oblige.

---------------------------------------------------------------------------------------------
1. What version of NewCS
2. What version of CCcam
3. Are you giving out N or C lines
4. What reader are you using

1. 1.67
2. 2.0.11
3. I'm giving peers C lines
4. Omikey 3132

Thursday, 24 December 2009

HOWTO: VDR 1.7.8, HDTV, VDPAU and CCcam with budget cards on Ubuntu 9.04 using S2API

HOWTO: VDR 1.7.8, HDTV, VDPAU and CCcam with budget cards on Ubuntu 9.04 using S2API

Introduction

Since September 2008 certain developers started a extension of the 4vl repository to add support for the second generation of DVB-api's which includes DVB-S2 support. This new extension is called S2API and has been included in v4l since October 2008 and is now also included in Linux kernel 2.6.28 and with Xubuntu 9.04 as well.

For those who don't want to use Google, I made a tutorial how I setup VDR in combination with my DVB budget card. I use the following hardware configuration:

- Enclosure : Antec NSK2480 (PSU included)
- Motherboard: Abit A-N78HD with the Geforce 8200 IGP
- CPU : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
- Memory : Kingston ValueRAM 2 GB DDR2-800 Kit (CL5)
- DVD-drive : LG GGC-H20LRB (DVD-RW, Blu-Ray and HDDVD)
- Harddisk : Samsung SpinPoint T 500GB
- Budgetcard : Hauppauge WinTV NOVA-HD-S2

All this, is connected to a Panasonic plasma using the onboard HDMI connector with the nvidia closed sources drivers.

DISCLAIMER: First I want to make one thing very clear. While this HOWTO allows you to get VDR running, I won't go into detail how you can install the compilation suite or other programs or Linux itself. I personally think that Linux knowledge is important before you continue to use Linux as your OS or as your primary DVB frontend.

I use Xubuntu 9.04 X86 myself and network, sound and video was working before starting the use of VDR. For dependencies, I use Ubuntu based apt-get install commands to get it compiled. Be sure to check your own distribution for the correct locations and additional depencies. Furthermore, I use the location /usr/local/src as the default directory. You can offcourse use an other location.

Before starting with this tutorial, make sure your DVB-S or DVB-S2 card is up and running (read: detected by Linux). For the people who use a Hauppauge NOVA-S2-HD or HVR-4000, you can use my other tutorial for that. Also, Igor's repo seems to support S2-3200 based cards as well.

WARNING! When using VDR 1.7.8, you require the S2API drivers and they must be downloaded installed! I use Igor's repo myself and this works with VDR 1.7.8. This tutorial works for DVB-S and DVB-S2 based budget cards and also DVB-S budget cards require S2API, even if they don't use it!

All commands which are used here, can be run from a Terminal Session within XFCE, KDE or Gnome or through a SSH connection. With all commands posted here, make sure you are using sudo -s so that your are the user root.

My Xubuntu 9.04 Desktop installation is the X86 edition. While my CPU can run the AMD64 edition, I decided not to do this. Mainly since certain optimalisation isn't entirely complete. So I would reccommend to install the X86 edition for the time being.

1. Xine and FFMpeg

Currently there does not exist a Full DVB-S2 card. Because of this we need to use a software based output plugin with VDR. Since we're going to use xineliboutput, we need additional software up-and-running before we're going to compile VDR and the additional plugins. We're going to use FFMpeg and Xine for this.

FFMpeg:
Code:
cd /usr/local/src
apt-get install build-essential
apt-get install mercurial cvs subversion git-core libncurses-dev
apt-get install autoconf libtool automake pkg-config gettext
apt-get install liba52-0.7.4-dev libmp3lame-dev libvorbis-dev zlib1g-dev libpng12-dev libx11-dev libxv-dev libxvmc-dev libasound2-dev libmpcdec-dev
apt-get install yasm
apt-get build-dep ffmpeg
git clone git://git.videolan.org/x264.git
cd x264
./configure --prefix=/usr --enable-pic --enable-shared --enable-pthread --enable-asm --extra-cflags="-mtune=native -march=native -mfpmath=sse -O4 -pipe"
make
make install
ldconfig -v
cd /usr/local/src
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/
./configure --prefix=/usr --enable-shared --enable-gpl --enable-postproc --enable-libmp3lame --enable-libvorbis --enable-pthreads --enable-libx264 --extra-cflags="-mtune=native -march=native -mfpmath=sse -O4 -pipe"
make
make install
ldconfig –v
Xine-Lib 1.2 CVS:
Code:
cd /usr/local/src
apt-get install libcdio-dev libvcdinfo-dev
hg clone http://hg.debian.org/hg/xine-lib/xine-lib-1.2
wget http://www8.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
tar xivf essential-20071007.tar.bz2
mv essential-20071007 /usr/lib/win32
ln -s /usr/lib/win32 /usr/lib/codecs
cd xine-lib-1.2
./autogen.sh --prefix=/usr --with-external-ffmpeg --disable-dxr3 --enable-w32dll --with-w32-path=/usr/lib/win32
make
make install
ldconfig -v
Xine-VDPAU 1.2 CVS:

Xine-VDPAU can only be used when you have a NVidia based GPU with Pure VideoHD capabilities. Als your GPU should have a minimum of 256MB of memory and you need to use v180.44 of de propriarty NVidia driver.

Code:
cd /usr/local/src
cd xine-lib-1.2
make uninstall
cd ..
mv xine-lib-1.2 xine-lib-1.2-non-vdpau
wget http://www.jusst.de/vdpau/files/xine-lib-1.2/xine-lib-1.2-vdpau-r273.diff.bz2
bzip2 -d xine-lib-1.2-vdpau-r273.diff.bz2
hg clone http://hg.debian.org/hg/xine-lib/xine-lib-1.2
cd xine-lib-1.2
patch -p1 < ../xine-lib-1.2-vdpau-r273.diff ./autogen.sh --prefix=/usr --with-external-ffmpeg --disable-dxr3 --enable-w32dll --with-w32-path=/usr/lib/win32 make make install ldconfig -v
Xine-UI CVS
Code:
cd /usr/local/src
apt-get install libxt-dev
# WARNING! We're going to install LIRCD and with this you can configure your remote if you want it used through LIRCD
apt-get install lirc lirc-modules-source lirc-x liblircclient-dev
wget http://home.vrweb.de/~rnissl/xine-ui-cvs-20090617220000.tar.bz2
tar xivf xine-ui-cvs-20090617220000.tar.bz2
cd xine-ui
./autogen.sh --prefix=/usr --enable-vdr-keys
make
make install
To test Xine and the other items. You can run the command xine from a Terminal Session (or use ALT-F2 and type xine as the command). If all goes well, the Xine-UI session should now come up. Because you started it for the first time, you can setup some items. For the time being, just press OK. Next you might want to play some media-files to check if the playback function works allright.

2. VDR and plugins

Now that Xine and FFmpeg have been installed. We can start with VDR 1.7.0 and the plugins.

VDR 1.7.8
Code:
cd /usr/local/src
apt-get install libfreetype6-dev libfontconfig1-dev libjpeg62-dev libcap-dev libncurses5-dev libncursesw5-dev
git clone git://projects.vdr-developer.org/vdr.git
wget http://www.thetick.de/vdr-1.7.8-extensions.tar.bz2
tar xivf vdr-1.7.8-extensions.tar.bz2
cd vdr/
patch -p1 < ../vdr-1.7.8_extensions.diff cp Make.config.template Make.config
Before starting to compile, you need to create Make.config file in the /usr/local/src/vdr folder using your favorite editor like vi, nano or mc. Be sure to use the following content:

Code:
#
# User defined Makefile options for the Video Disk Recorder
#
# Copy this file to 'Make.config' and change the parameters as necessary.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 2.1 2009/01/18 10:46:13 kls Exp $

### The C compiler and options:

CC = gcc
CFLAGS = -g -O2 -Wall

CXX = g++
CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses

ifdef PLUGIN
CFLAGS += -fPIC
CXXFLAGS += -fPIC
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
endif

### The directory environment:

DVBDIR = /usr/local/src/s2-liplianin/linux
MANDIR = /usr/man
BINDIR = /usr/bin

LOCDIR = /usr/share/locale
PLUGINDIR= ./PLUGINS
PLUGINLIBDIR= /usr/lib/vdr/plugins
VIDEODIR = /media/video
CONFDIR = /etc/vdr

### The remote control:

LIRC_DEVICE = /dev/null
RCU_DEVICE = /dev/ttyS1

## Define if you want vdr to not run as root
VDR_USER = root

### VDR-Extensions:
# Comment the patches you don't need
# DVDCHAPJUMP needs DVDARCHIVE enabled
# DVDARCHIVE needs LIEMIEXT enabled
# SORTRECORDS needs LIEMIEXT enabled
# you can only enable MENUORG or SETUP

#ANALOGTV = 1
#ATSC = 1
#CHANNELSCAN = 1
CMDRECCMDI18N = 1
CMDSUBMENU = 1
#CUTTERLIMIT = 1
#CUTTERQUEUE = 1
CUTTIME = 1
DDEPGENTRY = 1
#DELTIMESHIFTREC = 1
DOLBYINREC = 1
#DVBSETUP = 1
#DVDARCHIVE = 1
#DVDCHAPJUMP = 1
#DVLFRIENDLYFNAMES = 1
#DVLRECSCRIPTADDON = 1
#DVLVIDPREFER = 1
#EM84XX = 1
#GRAPHTFT = 1
#HARDLINKCUTTER = 1
#JUMPPLAY = 1
LIEMIEXT = 1
#LIRCSETTINGS = 1
#LNBSHARE = 1
#MAINMENUHOOKS = 1
#MENUORG = 1
#NOEPG = 1
#OSDMAXITEMS = 1
#PARENTALRATING = 1
#PINPLUGIN = 1
PLUGINAPI = 1
PLUGINMISSING = 1
#PLUGINPARAM = 1
ROTOR = 1
SETTIME = 1
#SETUP = 1
#SOFTOSD = 1
#SOURCECAPS = 1
#SORTRECORDS = 1
STREAMDEVEXT = 1
#TIMERCMD = 1
#TIMERINFO = 1
#TTXTSUBS = 1
#VALIDINPUT = 1
#VOLCTRL = 1
WAREAGLEICON = 1
YAEPG = 1

### You don't need to touch the following:

ifdef DVBDIR
INCLUDES += -I$(DVBDIR)/include
endif

ifdef ANALOGTV
DEFINES += -DUSE_ANALOGTV
endif

ifdef ATSC
DEFINES += -DUSE_ATSC
endif

ifdef CHANNELSCAN
DEFINES += -DUSE_CHANNELSCAN
endif

ifdef CMDRECCMDI18N
DEFINES += -DUSE_CMDRECCMDI18N
endif

ifdef CMDSUBMENU
DEFINES += -DUSE_CMDSUBMENU
endif

ifdef CUTTERLIMIT
DEFINES += -DUSE_CUTTERLIMIT
endif

ifdef CUTTERQUEUE
DEFINES += -DUSE_CUTTERQUEUE
endif

ifdef CUTTIME
DEFINES += -DUSE_CUTTIME
endif

ifdef DDEPGENTRY
DEFINES += -DUSE_DDEPGENTRY
endif

ifdef DELTIMESHIFTREC
DEFINES += -DUSE_DELTIMESHIFTREC
endif

ifdef DOLBYINREC
DEFINES += -DUSE_DOLBYINREC
endif

ifdef DVBSETUP
DEFINES += -DUSE_DVBSETUP
endif

ifdef DVDARCHIVE
ifdef LIEMIEXT
DEFINES += -DUSE_DVDARCHIVE
endif
endif

ifdef DVLRECSCRIPTADDON
DEFINES += -DUSE_DVLRECSCRIPTADDON
endif

ifdef DVLVIDPREFER
DEFINES += -DUSE_DVLVIDPREFER
endif

ifdef DVLFRIENDLYFNAMES
DEFINES += -DUSE_DVLFRIENDLYFNAMES
endif

ifdef EM84XX
DEFINES += -DUSE_EM84XX
endif

ifdef GRAPHTFT
DEFINES += -DUSE_GRAPHTFT
endif

ifdef HARDLINKCUTTER
DEFINES += -DUSE_HARDLINKCUTTER
endif

ifdef JUMPPLAY
DEFINES += -DUSE_JUMPPLAY
endif

ifdef LIEMIEXT
DEFINES += -DUSE_LIEMIEXT
endif

ifdef LIRCSETTINGS
DEFINES += -DUSE_LIRCSETTINGS
endif

ifdef LNBSHARE
DEFINES += -DUSE_LNBSHARE
endif

ifdef MAINMENUHOOKS
DEFINES += -DUSE_MAINMENUHOOKS
endif

ifdef MENUORG
DEFINES += -DUSE_MENUORG
else
ifdef SETUP
DEFINES += -DUSE_SETUP
endif
endif

ifdef NOEPG
DEFINES += -DUSE_NOEPG
endif

ifdef OSDMAXITEMS
DEFINES += -DUSE_OSDMAXITEMS
endif

ifdef PARENTALRATING
DEFINES += -DUSE_PARENTALRATING
endif

ifdef PINPLUGIN
DEFINES += -DUSE_PINPLUGIN
endif

ifdef PLUGINMISSING
DEFINES += -DUSE_PLUGINMISSING
endif

ifdef PLUGINPARAM
DEFINES += -DUSE_PLUGINPARAM
endif

ifdef ROTOR
DEFINES += -DUSE_ROTOR
endif

ifdef SETTIME
DEFINES += -DUSE_SETTIME
endif

ifdef SOFTOSD
DEFINES += -DUSE_SOFTOSD
endif

ifdef SOURCECAPS
DEFINES += -DUSE_SOURCECAPS
endif

ifdef SORTRECORDS
ifdef LIEMIEXT
DEFINES += -DUSE_SORTRECORDS
endif
endif

ifdef STREAMDEVEXT
DEFINES += -DUSE_STREAMDEVEXT
endif

ifdef TIMERCMD
DEFINES += -DUSE_TIMERCMD
endif

ifdef TIMERINFO
DEFINES += -DUSE_TIMERINFO
endif

ifdef TTXTSUBS
DEFINES += -DUSE_TTXTSUBS
endif

ifdef VALIDINPUT
DEFINES += -DUSE_VALIDINPUT
endif

ifdef VOLCTRL
DEFINES += -DUSE_VOLCTRL
endif

ifdef WAREAGLEICON
DEFINES += -DUSE_WAREAGLEICON
endif

ifdef YAEPG
DEFINES += -DUSE_YAEPG
endif
Now we can start with the rest:

Code:
mkdir /media/video
mkdir -p /usr/lib/vdr/plugins
mkdir -p /usr/lib/vdr/scripts
mkdir -p /etc/vdr/plugins
mkdir -P /usr/local/src/vdr/PLUGINS/lib
make
make plugins
make install
cp -a svdrpsend.pl /usr/bin
cp *.conf /etc/vdr/
vdr-xine 0.9.3 - software output plugin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://home.vrweb.de/~rnissl/vdr-xine-0.9.3.tgz
tar xivf vdr-xine-0.9.3.tgz
ln -s xine-0.9.3 xine
cd xine/data
mkdir /etc/vdr/plugins/xine
cp * /etc/vdr/plugins/xine
make plugins
make install-plugins
sc TRUNK - softcam plugin
Code:
cd /usr/local/src/vdr/PLUGINS/src
apt-get install libssl-dev
apt-get install libbz2-dev
hg clone -r trunk http://85.17.209.13:6100/
make plugins
make install
mkdir -p /etc/vdr/plugins/sc
OSD Teletext - Teletext plugin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://projects.vdr-developer.org/attachments/download/116/
make plugins
make install
mkdir -p /var/cache/vdr/vtx
Femon - Signal Information plugin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/
make plugins
make install
Remote - Remote plugin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://www.escape-edv.de/endriss/vdr/vdr-remote-0.4.0.tgz
tar xzvf vdr-remote-0.4.0.tgz
ln -s remote-0.4.0 remote
cd remote
sed -i Makefile -e 's/VDRVERSION/
make plugins
make install
EnigmaNG - VDR Skin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://andreas.vdr-developer.org/enigmang/download/
make plugins
make install
mkdir -p /etc/vdr/plugins/skinenigmang
cd /etc/vdr/plugins
wget http://andreas.vdr-developer.org/enigmang/download/skinenigmang-logos-xpm-hi-20070702.tgz
wget http://andreas.vdr-developer.org/enigmang/download/skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-logos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
Skin Reel - VDR Skin
Code:
cd /usr/local/src/vdr/PLUGINS/src
wget http://rsync16.de.gentoo.org/files/vdr-skinreel/vdr-skinreel-0.0.1.tgz
tar xzvf vdr-skinreel-0.0.1.tgz
ln -s skinreel-0.0.1 skinreel
cd skinreel
sed -i Makefile -e 's/VDRVERSION/APIVERSION/g'
cp -r skinreel /etc/vdr/
make plugins
make install
3. Configuration

Since we now have VDR and the plugins installed. We can continue with the configuration of VDR and other items.

3.1. VDR and Plugins

With the command /usr/bin/vdr --help you get an overview of the options of VDR and it's plugins. This information is very important for configuring VDR or the plugins.

To make life easier, we create a script called /var/bin/runvdr which can be edited with for instance mcedit (apt-get install mc), nano or vi. I use the following configuration myself:
Code:
export LANG=en_EN
export LC_COLLATE=en_EN

PATH=/usr/local/bin:$PATH

VDRPRG="/usr/bin/vdr"
VDRCMD="/usr/bin/vdr -c /etc/vdr -E /var/vdr -l 3 \
-s /var/bin/vdrpoweroff.sh \
-P sc \
-P femon \
-P skinreel \
-P xine \
-u root \
$*"

KILL="/usr/bin/killall -q -TERM"

# Detect whether the DVB driver is already loaded
# and return 0 if it *is* loaded, 1 if not:
DriverLoaded()
{
return 1
}

# Load all DVB driver modules needed for your hardware:
LoadDriver ()
{

return 0

}

# Unload all DVB driver modules loaded in LoadDriver():
UnloadDriver ()
{

return 0

}

# Load driver if it hasn't been loaded already:
if ! DriverLoaded; then
LoadDriver
fi

while (true) do
eval "$VDRCMD"
if test $? -eq 0 -o $? -eq 2; then exit; fi
echo "`date` reloading DVB driver"
$KILL $VDRPRG
sleep 10
UnloadDriver
LoadDriver
echo "`date` restarting VDR"
done
Pay close attention to the -P items. Those are the plugins which we're going to use and with -P we enable them and plugins with options should go between quotes using the following way: 'pluginname options'. Use the --help switch with the vdr binary, to get the overview off the options from VDR as well as the plugins.

One of the items which could be usefull, is the options with the remote plugin. Since I use the included Hauppauge remote, I use the input portion of the DVB driver. With the remote plugin I can call the input portion of the DVB driver. Since many DVB cards have are included with a remote, you can use the remote plugin to use that remote. To find out what the correct syntax is for the input location, you can do the following:

Code:
root@htpc:~# cd /dev/input/by-path/
root@htpc:/dev/input/by-path# ls -il
total 0
11787 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 pci-0000:00:04.0-usb-0:2:1.3-event- -> ../event2
12213 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 pci-0000:01:06.0--event-ir -> ../event7
12434 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 pci-1-3--event-ir -> ../event8
11766 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 platform-i8042-serio-0-event-kbd -> ../event1
11834 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 platform-i8042-serio-1-event-mouse -> ../event6
11844 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 platform-i8042-serio-1-mouse -> ../mouse1
11855 lrwxrwxrwx 1 root root 9 2008-09-06 16:56 platform-pcspkr-event-spkr -> ../event3
As you can see, my remote is linked to pci-0000:01:06.0--event-ir (or /dev/input/event7) and that's what I use as input for the -i switch with the remote plugin. I don't use the location /dev/input/event7 since this can change when you rmmod and insmod the drivers again. And the ID of the PCI device won't change, so that's propably safer to use.

You can also use the remote plugin to use the lircd driver instead of the input driver. The lircd daemon/driver is needed when we want to use for instance a MCE remote. When we compiled the xine-ui part, we installed the lircd portion and you (hopefully) your remote. If you did not, you can do it again with the command dpkg-reconfigure lirc-modules-source. You can then use the following line in runvdr for using the remote plugin with the lircd:
Code:
-P'remote -l /dev/lircd' \
3.2. DISEqC

As you can see in my signature, I have a Wavefrontier T55 and it's installed with 4 LNB's aiming on 19.2e, 13.0e, 23.5e, 28.2e and 28.5e. The LNB's are then connected to a DISEqC 1.0 switch which uses the AA till BB configuration for switching. To use DISEqC we need to do two things, mainly edit /etc/vdr/diseqc.conf and enable DISEqC in the VDR setup.

As an example, I use the following configuration with my DISEqC switch and DVB card:
Code:
# port 1 option a position a
# port 2 option a position b
# port 3 option b position a
# port 4 option b position b
#
# DISEQC 4/1 setting on TT S2-3200
#
# port 1
S19.2E 11700 V 9750 t v W15 [E0 10 38 F0] W100 [E0 10 38 F0] W100 [E0 11 00] W100 A W15 t
S19.2E 99999 V 10600 t v W15 [E0 10 38 F1] W100 [E0 10 38 F1] W100 [E0 11 00] W100 A W15 T
S19.2E 11700 H 9750 t V W15 [E0 10 38 F2] W100 [E0 10 38 F2] W100 [E0 11 00] W100 A W15 t
S19.2E 99999 H 10600 t V W15 [E0 10 38 F3] W100 [E0 10 38 F3] W100 [E0 11 00] W100 A W15 T
# port 2
S13.0E 11700 V 9750 t v W15 [E0 10 38 F4] W100 [E0 10 38 F4] W100 [E0 11 00] W100 B W15 t
S13.0E 99999 V 10600 t v W15 [E0 10 38 F5] W100 [E0 10 38 F5] W100 [E0 11 00] W100 B W15 T
S13.0E 11700 H 9750 t V W15 [E0 10 38 F6] W100 [E0 10 38 F6] W100 [E0 11 00] W100 B W15 t
S13.0E 99999 H 10600 t V W15 [E0 10 38 F7] W100 [E0 10 38 F7] W100 [E0 11 00] W100 B W15 T
# port 3
S23.5E 11700 V 9750 t v W15 [E0 10 38 F8] W100 [E0 10 38 F8] W100 [E0 11 00] W100 A W15 t
S23.5E 99999 V 10600 t v W15 [E0 10 38 F9] W100 [E0 10 38 F9] W100 [E0 11 00] W100 A W15 T
S23.5E 11700 H 9750 t V W15 [E0 10 38 FA] W100 [E0 10 38 FA] W100 [E0 11 00] W100 A W15 t
S23.5E 99999 H 10600 t V W15 [E0 10 38 FB] W100 [E0 10 38 FB] W100 [E0 11 00] W100 A W15 T
# port 4
S28.2E 11700 V 9750 t v W15 [E0 10 38 FC] W100 [E0 10 38 FC] W100 [E0 11 00] W100 B W15 t
S28.2E 99999 V 10600 t v W15 [E0 10 38 FD] W100 [E0 10 38 FD] W100 [E0 11 00] W100 B W15 T
S28.2E 11700 H 9750 t V W15 [E0 10 38 FE] W100 [E0 10 38 FE] W100 [E0 11 00] W100 B W15 t
S28.2E 99999 H 10600 t V W15 [E0 10 38 FF] W100 [E0 10 38 FF] W100 [E0 11 00] W100 B W15 T
S28.5E 11700 V 9750 t v W15 [E0 10 38 FC] W100 [E0 10 38 FC] W100 [E0 11 00] W100 B W15 t
S28.5E 99999 V 10600 t v W15 [E0 10 38 FD] W100 [E0 10 38 FD] W100 [E0 11 00] W100 B W15 T
S28.5E 11700 H 9750 t V W15 [E0 10 38 FE] W100 [E0 10 38 FE] W100 [E0 11 00] W100 B W15 t
S28.5E 99999 H 10600 t V W15 [E0 10 38 FF] W100 [E0 10 38 FF] W100 [E0 11 00] W100 B W15 T
While we can't enable DISEqC yet, you do this later when you have VDR running. To enable DISEqC within VDR, Press the configured Menu button -> Goto Setup -> Goto LNB -> Set the option Use DISEqC to Yes -> Acknowledge with the configured OK button.

3.3. CCcam and the sc plugin

When you installed the sc plugin, you're adviced to create some scripts and download the CCcam.x86 binaries to get CCcam running. To make one thing clearly, CCcam on Linux/X86 requires a preload so that the sc plugin can read/write the data to unlock the channel.

To make your (and mine ;) ) life easier, we create an init.d and run scripts called cccam (/etc/init.d/cccam) and run.sh (/var/bin/run.sh). Also required is the ca.c (/var/bin/ca.c) file which is used for the preload. The files have the following contents:

File: /etc/init.d/cccam
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: CCcam
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start, Stop or Restart the CCcam softcam
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
set -e

# Reset status of this service
# rc_reset

#
case "$1" in
start)
echo -n "Starting CCcam "
/var/bin/run.sh &
# Remember status and be verbose
;;
stop)
echo -n "Shutting down CCcam "
killall run.sh
killall CCcam.x86
# Remember status and be verbose
;;
restart)
echo -n "Restart CCcam "
$0 stop
$0 start
# Remember status and be quiet
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# rc_exit
exit 0
File: /var/bin/run.sh
Code:
#!/bin/sh
cd /var/bin
gcc -march=pentium -mmmx -fomit-frame-pointer -fexpensive-optimizations -funroll-loops -fPIC -shared -o ca.so ca.c -ldl
LD_PRELOAD=./ca.so ; export LD_PRELOAD
while [ 1 ];
do
./CCcam.x86 -d > /var/log/CCcam.log
done
File: /var/bin/ca.c
Code:
cp /usr/local/src/vdr/PLUGINS/src/sc/contrib/cccam_ca.c /var/bin/ca.c
Last we need to make the scripts executable:
Code:
chmod a+x /etc/init.d/cccam
chmod a+x /var/bin/run.sh
This scipt has the options: start (start CCcam), stop (stop CCcam) and restart (restart CCcam) -> Example: /etc/init.d/cccam start. With this script the preload will be done automaticly and it infact starts the /var/bin/run.sh script which then compiles the preload file and starts CCcam in debug mode. WARNING! Never run the CCcam.x86 binary, use the run.sh script instead!

Also, before starting VDR, make sure you have the CCcam instance running. It can take a while before the CCcam run is completed. Configuring CCcam can be done using the file /var/etc/CCcam.cfg.

When we installed the sc plugin, you also need to tell the plugin how to connect using the cardclient.conf file (full location: /etc/vdr/plugins/sc/cardclient.conf). The following configuration is needed for use with CCcam, create the file using vi, nano or mc:

Code:
#
# Comment lines can start with # or ;
#
# every client line starts with the client name, followed by some arguments:
# 'hostname' is the name of the server
# 'port' is the port on the server
# 'emm' is a flag to allow EMM transfers to the server
# (0=disabled 1=enabled)
# 'caid' (optional) caid on which this client should work
# 'mask' (optional) mask for caid e.g. caid=1700 mask=FF00 would allow
# anything between 1700 & 17FF.
# Default is 1700 & FF00. If only caid is given mask is FFFF.
# You may give multiple caid/mask values comma separated
# (e.g. 1702,1722,0d0c/ff00).
# 'username' is the login username
# 'password' is the login password
#
# radegast client
# radegast:hostname:port:emm/caid/mask
#
# aroureos client
# 'hexbase'
# 'hexserial' card data for which EMM updates should be send
# aroureos:hostname:port:emm/caid/mask:hexbase:hexserial
#
# camd33 client (tcp protocol)
# 'aeskey' is the AES key (32bytes), disable encryption if missing
# camd33:hostname:port:emm/caid/mask:username:password:aeskey
#
# camd35 client (udp protocol)
# camd35:hostname:port:emm/caid/mask:username:password
#
# cardd client
# cardd:hostname:port:emm/caid/mask:username:password
#
# buffy client
# 'aeskey' is the AES key (32bytes), disable encryption if missing
# buffy:hostname:port:emm:username:password:aeskey
#
# newcamd client
# 'cfgkey' is the config key (28bytes)
# newcamd:hostname:port:emm/caid/mask:username:password:cfgKey
#
# gbox client
#
# NOTE: hostname & port will be ignore. GBOX must be runnning on the local
# machine. For convinience you should choose localhost:8004
# gbox:hostname:port:emm/caid/mask
#
# ccam client
#
# NOTE: hostname will be ignore. CCcam must be runnning on the local machine
# 'socket' is the name of the camd socket file. For multiple cards add %d
# into the string. This will be replaced with the number 0-3.
# e.g. /var/emu/chroot%d/tmp/camd.socket
cccam:127.0.0.1:9000:1/0000/0000:/tmp/camd.socket
All CAID's from VDR will be put through CCcam with the current config. You can also edit the file and add newcamd, gbox, camd3, etc connections as well. Just remember, the priority is based upon the location. The 1st line is the 1st to be checked if it can open the channel.

3.4. Channels.conf

The default channels.conf is a bit empty, only some FTA channels from Astra 19.2e are there. If you want to add other channels and or sats, you can use the pre-scanned files from the Linowsat Settings VDR channels.conf page. With wget or a browser you can download the files. If you want to add multiple sats, be sure to download the file you want and cat it to the channels.conf (example: cat all.conf >> /var/etc/channels.conf).

The channels.conf itself, is just plain text file. So you can edit it with an editor and change it to your liking. Just make sure you have shutdown VDR before editing the file, otherwise your contributions will be overwritten. Items starting with :-> are infact bouquets names. With the config from linowsat, it's been set on the transponder and satellite. But offcourse you can add your own bouquet and change it for instance the provider.

To go through the bouquets, just watch a channel and press the button which is configured for left and right. When you are at your wanted bouquet, simply press the configured button for OK and it will change to the first channel in the bouqet.

3.5. Running VDR

If you have configured the runvdr script, we can now start VDR. Also for your convinience we create a init.d script called vdr (full location: /etc/init.d/vdr), create it using vi, nano or mc:

Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: VDR
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start, Stop or Restart VDR
### END INIT INFO

# Shell functions sourced from /etc/rc.status:
set -e

# Reset status of this service
# rc_reset

#
case "$1" in
start)
echo -n "Starting VDR "
/var/bin/runvdr >> /var/log/vdr.log &
# Remember status and be verbose
;;
stop)
echo -n "Shutting down VDR "
killall runvdr
killall vdr
# Remember status and be verbose
;;
restart)
echo -n "Restart VDR "
$0 stop
$0 start

# Remember status and be quiet
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
# rc_exit
exit 0
After creating the file, make sure that the runvdr and the init.d script can be executed:

Code:
chmod a+x /var/bin/runvdr
chmod a+x /etc/init.d/vdr
With the options start, stop and restart you can start, stop or restart the VDR process. The output of VDR is being written to the file /var/log/user.log. So if it fails, be sure to check that file for information about the error.

Since we use the vdr-xine plugin, we use the xine frontend to watch the VDR output. To start xine, simply login into your X-session and when the desktop is shown, open a Terminal Session and type the following:

Code:
/usr/bin/xine -V xv -f -r anamorphic  --post vdr_video --post vdr_audio --post upmix_mono --post vdr --verbose=2 "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes"
With the above option the xine binary will start. Additionally you can change the -V switch to VDPAU if you used the Xine-VDPAU part of this tutorial. Ultimately you can use a frontend like oxine or Linux MMS to start xine. But to be honest, this is outside of this tutorial ;)

When you start VDR for the first time, you'll need to configure your remote. Just press any key of the remote and follow the onscreen information. It's rather easy to understand and to setup your remote.

4. Some last words and knowhow

VDR is extremely flexible and can be expanded with a lot of plugins. I helped you with the plugins I think will be used the most. Just to make sure, most of the plugins have the option to be configured within VDR. To do this, press the button which is configured for Menu, goto Setup, select plugins and select the plugin you want to configure.

One important thing is, that options set within VDR must be applied by pressing the button which is configured for OK. If you don't do this, your changes will be reset to the original values.

If people encounter problems when viewing HDTV channels or if you can't lock onto a channel. The easiest way to check this, is to see if you get EPG information. If not, check the modulation and settings of the DVB-S2 transponder by going to the channellist, select your channel and press the Red button (edit). Edit the transponder information with the help of the kingofsat.net satellite information. Also, it can take a while before VDR changes the CAID's and that the sc plugin pick them up. Just be patient and eventually the channel will open (if you have correct subscription).

Concerning HDTV, with the following options you can modify the behaviour of ffmpeg when viewing h264 streams. Change these options in $HOME/.xine/config with the editor of your choice. Be sure to shutdown vdr-sxfe and VDR before changing.

Code:
video.processing.ffmpeg_choose_speed_over_accuracy:1
video.processing.ffmpeg_pp_quality:0
video.processing.ffmpeg_skip_loop_filter:all
# number of cores you have in your system:
video.processing.ffmpeg_thread_count:2
In combination with VDPAU you need to edit $HOME/.xine/config and enable the following settings:

[code]
# default number of video frames
# numeric, default: 15
engine.buffers.video_num_frames:22

# Choose speed over specification compliance
# bool, default: 0
video.processing.ffmpeg_choose_speed_over_accuracy :1

# MPEG-4 postprocessing quality
# [0..6], default: 3
video.processing.ffmpeg_pp_quality:0

# Skip loop filter
# { default none nonref bidir nonkey all }, default: 0
video.processing.ffmpeg_skip_loop_filter:all

# FFmpeg video decoding thread count
# numeric, default: 1
video.processing.ffmpeg_thread_count:2
[code]

Anyway, I hope you like this tutorial. And many thanks to several people, especially cr0w and Jackblow! If you do like this tutorial, please use the Thanks button in this thread!

Compile XBMC
Now to the fun part.
Code:
svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/pvr-testing/XBMC
cd XBMC
Read README.linux and apt-get the necessary packages. Then, as usual:
Code:
./configure --enable-vdpau
make -j2
sudo checkinstall --fstrans=no --install=yes --pkgname=xbmc --pkgversion "svn19616-vdr-testing"
xbmc
Select the PVR addon under Settings -> Video -> TV -> Manage Clients. This opens a addon browser where you add the VDR client. You now have an additional "TV" entry in PM3.HD, which lets you watch Live TV and much more. Have fun and thanks again to alwinus for this great patch!

w_scan

w_scan

w_scan is an application that greatly simplifies the task of scanning for DVB-T, DVB-C and ATSC channel information. Winfried Köhler’s w_scan is special because it does not require any region-specific initial transponder data for operation. It will create configuration files for VDR and Kaffeine and Xine.
wirbel.htpc-forum.de

Installing w_scan

Begin by downloading the source for the w_scan application and unpacking the tarball:

root@ubuntu:~# wget "http://wirbel.htpc-forum.de/w_scan/w_scan-20090504.tar.bz2"
root@ubuntu:~# tar xfvj w_scan-20090504.tar.bz2

A pre-compiled version of w_scan is included in the tarball.

Compiling from Source

If you want to compile w_scan from source, move the directory w_scan-20090504 to /usr/local/src/ and create a symbolic link:

root@ubuntu:~# mv w_scan-20090504/ /usr/local/src/
root@ubuntu:~# cd /usr/local/src/
root@ubuntu:/usr/local/src# ln -s w_scan-20090504/ w_scan

Build the application with the following two commands:

root@ubuntu:/usr/local/src# cd w_scan
root@ubuntu:/usr/local/src/w_scan# make

Continue by copying w_scan to /usr/local/bin/:

root@ubuntu:/usr/local/src/w_scan# cp w_scan /usr/local/bin/

Examples for Using w_scan

DVB-T for VDR 1.6.x (Germany)

root@ubuntu:~# w_scan -ft -c DE >> /etc/vdr/channels.conf

DVB-T for VDR 1.6.x (United Kingdom)

root@ubuntu:~# w_scan -ft -c GB >> /etc/vdr/channels.conf

DVB-C for VDR 1.6.x (Germany)

root@ubuntu:~# w_scan -fc -c DE >> /etc/vdr/channels.conf

DVB-T and DVB-C for VDR 1.4.x (Germany)

root@ubuntu:~# w_scan -ft -c DE >> /etc/vdr/channels.conf && w_scan -fc -c DE >> /etc/vdr/channels.conf

DVB-S, HDTV for VDR 1.7 (Astra S19.2E)

root@ubuntu:~# w_scan -fs -s S19E2 -o7 >> /etc/vdr/channels.conf

DVB-S, HDTV for VDR 1.6 and earlier (Hotbird S13.0E)

root@ubuntu:~# w_scan -fs -s S13E0 >> /etc/vdr/channels.conf

Create DVB-T Initial Tuning Data (Germany)

root@ubuntu:~# w_scan -ft -c DE -x >> initial-tuning-data.txt

Create DVB-C Initial Tuning Data (Germany)

root@ubuntu:~# w_scan -fc -c DE -x >> initial-tuning-data.txt

Create DVB-S Initial Tuning Data (Astra S19.2E)

root@ubuntu:~# w_scan -fs -s S19E2 -x >> initial-tuning-data.txt

DVB-T Channels for Kaffeine (Germany)

root@ubuntu:~# w_scan -k -c DE >> channels.dvb

DVB-C Channels for Kaffeine

root@ubuntu:~# w_scan -fc -k >> channels.dvb

DVB-T for Czap/Tzap/Xine (United Kingdom)

root@ubuntu:~# w_scan -ft -c GB -X >> channels.conf

DVB-C for Czap/Tzap/Xine (Germany)

w_scan -fc -c DE -X >> channels.conf

ATSC Terrestial (VSB)

root@ubuntu:~# w_scan -fa >> channels.conf

ATSC Cable (US QAM Annex-B)

root@ubuntu:~# w_scan -A2 >> channels.conf

ATSC Terrestial (VSB) and Cable (US QAM Annex-B)

root@ubuntu:~# w_scan -A3 >> channels.conf

Display Options

Get a list of available options by calling w_scan with the option -h:

root@ubuntu:~# w_scan -h

Get an extended list of options by calling w_scan with the option -H:

root@ubuntu:~# w_scan -H

Create Log file

Generate a log file with the following command:

root@ubuntu:~# w_scan -v -v 2>&1 | tee w_scan.log

Start script

Run the w_scan start script with the following command:

root@ubuntu:~# ./w_scan_start.sh

Monday, 14 December 2009

Create a Bootable Ubuntu USB Flash Drive the Easy Way :: the How-To Geek

Create a Bootable Ubuntu USB Flash Drive the Easy Way

We’ve already covered how to use an Ubuntu Live CD to backup files from your dead Windows computer, but using the boot cd can sometimes be a little slow. We can speed up the booting process by installing Ubuntu to a bootable USB flash drive instead.

To accomplish this, we’ll use a tiny software package called UNetbootin, which is designed to make the installation process simple and easy.

Create the Bootable Flash Drive

You’ll first need to download the UNetbootin software and save it somewhere useful, since there’s no installation required, just double-click to run.

I chose to use an already downloaded ISO image of the Ubuntu installation cd, and then chose my flash drive, and clicked the OK button. Yes, this step is as simple as that.

image

The process will extract the files from the ISO image (or download them), copy them to the flash drive and then install the bootloader. Depending on what you are installing, this really doesn’t take very long.

image

Once the process is completed, you’ll be prompted to reboot… which you don’t necessarily have to do unless you want to test booting the flash drive on the same machine you are using.

image

Otherwise you can hit the Exit button.

Make Sure the Partition is Active

If you get a boot device error when you try and boot from the flash device, it could be that your partition is not marked as active. What we’ll do is use the command line diskpart utility to fix this… if you are in Vista open an administrator mode command prompt by right-clicking and choosing Run as Administrator.

Now you’ll need to run this command to figure out the number of your flash drive:

list disk

This will show you the list of drives, and you will use the disk number in the “select disk” command:

select disk 1

select partition 1

active

The “active” command will actually mark the current partition as active, which is why you need to select the disk and then the partition. At this point you should be done.

image

Booting From the Flash Drive

Now that you are all finished, you can try and boot from the flash drive. Every BIOS is different, but most of them will have a message like “Press F12 for the Boot Menu”, which is highly suggested. The boot menu will allow you to select the USB drive as the boot device. (apologies for the simply horrible camera phone screenshots)

image

Instead of the regular Ubuntu boot menu that you might be used to seeing, you will see the UNetbootin menu, which has essentially the same options.

image

Useful Note

If you are having issues booting Ubuntu Hardy (8.04) on a Dell machine, you might want to switch back to using Ubuntu 7.10 instead.

I was able to boot all the way into the desktop in about 35 seconds using the flash drive… way faster than using the regular live cd.

image

Stay tuned, we’re going to explore even more options for bootable CDs and USB drives that help you repair your computer.