Author Topic: HTPC DVB-S2 VDR 1.7.5 CCcam Howto ..ubuntu  (Read 1761 times)

0 Members and 1 Guest are viewing this topic.

Offline antox

  • Ferengi
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 16798
HTPC DVB-S2 VDR 1.7.5 CCcam Howto ..ubuntu
« on: December 04, 2009, 10:32:30 PM »
 HTPC DVB-S2 VDR 1.7.8 CCcam Howto
FOREWORD: This tutorial is for Ubuntu 8.10
It should work with Ubuntu 8.04 but with Ubuntu 9.04 or 9.10 you may face problems (for example the skinenigma plugin will fail to compile although if you use the one on my binaries should be fine)
If you are running ubuntu 9.10 then you might want to make your life easier by simply adding these 2 repositories:
(thanks to hotzenplotz5 (see page 19 of this thread)
You can find there: vdr-1.7.9 + plugins (120) + xine-vdpau etc
Code: You are not allowed to view links. Register or Login
https://launchpad.net/~hotzenplotz5/+archive/ppa
Code: You are not allowed to view links. Register or Login
deb-src [url]http://ppa.launchpad.net/hotzenplotz5/ppa/ubuntu[/url] karmic main
Code: You are not allowed to view links. Register or Login
deb [url]http://ppa.launchpad.net/hotzenplotz5/ppa/ubuntu[/url] karmic mainThe background.
I had a Dreambox 7020 and was happy enough with it but one day HD finally came in the horizon.
I looked at a Dreambox 800, ipbox revo, and a couple of other linux based HD sat receivers. None was satisfying.
So I set out to build my own. If this tutorial intimidates you or time is precios to you, drop me a private message and I can send you a bootable restore dvd that is all up and running.

The goal of this howto is to build a functional HTPC with HD satellite tv and HDMI output at 1080p (1920×1080 16:9). The idea is for a dedicated machine. We assume a brand-new installation and given the complexity of the tutorial the reasonable way to undo all the changes is to reinstall Ubuntu.
VDR 1.7.10 (see screenshots) is the heart of this project (thanks to Klaus.Schmidinger for his tremendous work and for his patience answering my questions, thanks to Shalafi for his own tutorial and for moderating an excellent satellite forum, and to Winfried for his channels scanning and rotor coding for VDR)

If you rather use VDR 1.7.0 then see my other thread
Code: You are not allowed to view links. Register or Login
NOTICE: By popular demand I have placed vdr-1.7.9 with the extensions patch,
 setup, teletext, subtitles and other usefull plugins together with most of
the config files in this tutorial in a .rar file
DOWNLOAD IT HERE
You still need to setup ffmpeg, xine-lib, xine-ui and the oxine binaries
but the rest should be working fine and save lots of time and efforts.

The hardware I chose:
- Motherboard: Abit A-N78HD with the Geforce 8200 IGP
or ASUS M3N78-VM AM2 (both work fine with OSS but the Abit can not do HDMI sound with ALSA)
- CPU : AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
- Thermalite silent fan
- Memory : 2 GB DDR2-800 (2X 1 GB)
- DVD-drive : LG GGC-H20LRB (DVD-RW, Blu-Ray and HDDVD)
- Harddisk : 160GB
- Budgetcard : Hauppauge WinTV NOVA-HD-S2

All this, is connected to a Panasonic FullHD LCD-TV using the onboard HDMI connector with the nvidia closed sources driver 180.53

VDR has many plugins, some more frequently maintained than others.
The exact set of plugins you use is up to you and your needs.
This is my current set of VDR plugins:
DOWNLOAD HERE my /usr/local/src/vdr-1.7.9 with all the plugins and patches listed below: (just do sudo make install )

vdr (1.7.10/1.7.10) - The Video Disk Recorder
femon (1.7.4) - DVB Signal Information Monitor (OSD)
osdteletext (0.8.3) - Displays teletext on the OSD
pluginsetup (0.0.6) - Plugin Setup
timeline (1.0.141-kw001) - Show timer overview and collisions
imdbsearch (0.3.6) - Searches the IMDb
skinenigmang (0.1.0) - EnigmaNG skin
quickepgsearch (0.0.1) - Quick search for broadcasts
satlist (0.0.2) - Channel list for satellite sorting
premiereepg (0.2.0) - Parses extended Premiere EPG data
epgsearchonly (0.0.1) - Direct access to epgsearch's search menu
systeminfo (0.1.1) - Display various system informations
control (0.0.2a-kw3) - Control VDR over terminal or telnet
epgsearch (0.9.25.beta13) - search the EPG for repeats and more
mplayer (0.10.1) - Media replay via MPlayer
conflictcheckonly (0.0.1) - Direct access to epgsearch's conflict check menu
osdadjust (0.0.3) - Adjust OSD Size and Position
setup (0.3.1-zulu-edition) - VDR-Setup Extension
chanman (0.0.8) - Channel manager plugin
wirbelscan (0.0.5-pre08) - DVB and pvrinput channel scan for VDR
ttxtsubs (0.1.0) - Teletext subtitles
sc (1.0.0pre-HG-85fce21e5440+) - A software emulated CAM
skinreel (0.0.1) - Reel Skin-Plugin
xine (0.9.3) - Software based playback using xine


1. The Sound of Music: ALSA or OSS
Note: I use OSS as with ALSA couldn't get sound over HDMI.
Current OSS as of 2th July 2009 is OSS 4.1-1052

You need to edit /etc/modprobe.d/blacklist-local and blacklist nv and nvidia-new drivers to avoid conflicts in the next step. If you have decided to install OSS then you need to blacklist snd_hda_intel as well

sudo gedit /etc/modprobe.d/blacklist-local
Code: You are not allowed to view links. Register or Login
# It is mandatory to blacklist nvidia_new and nv to avoid conflicts
blacklist nvidia_new
blacklist nv
# If you are going to use OSS instead of ALSA also blacklist snd_hda_intel
blacklist snd_hda_intel
2. NVIDIA drivers
NVIDIA drivers as of 180.50 or earlier do not work with this motherboard (I have tried the beta 185.18.10 driver and it did not work for me but 185.18.08 works)
If somebody can confirm they make a difference please let me know version and motherboard you have.

Instead download NVIDIA 177.82 and install it. Reboot and you should have 1080p resolution

Note: If you want VDPAU accelearation and your NVIDIA card supports it (8xxx or 9xxx series) then you can install
NVIDIA 185.18.10 instead

3. ALSA OR OSS


To the best of my knowledge if you want the audio output through the HDMI connector straight to your TV you will need to install OSS and disable ALSA.
But this is not without problems as OSS will work for 6 months and will require reinstallation every 6 months (unless you purchase a licence from them)
So if you want audio over HDMI install OSS, otherwise stick with ALSA for simplicity

Installing OSS:

We go to the oss website and download oss:

Code: You are not allowed to view links. Register or Login
http://www.opensound.com/download.cgi
We choose linux 2.6 - deb - x86
Code: You are not allowed to view links. Register or Login
sudo apt-get install linux-headers-generic linux-source build-essential
sudo dpkg -i oss-linux-4.1-1052_i386.deb
sudo soundon
osstest
ossinfo -x
ossxmix -dX
Once you have followed the above guide to install OSS modify /usr/lib/oss/soundon.user
so it looks like this:
Code: You are not allowed to view links. Register or Login
sudo rm /usr/lib/oss/soundon.user
sudo touch /usr/lib/oss/soundon.user
sudo chmod 755 /usr/lib/oss/soundon.user
sudo gedit /usr/lib/oss/soundon.user
Code: You are not allowed to view links. Register or Login
#!/bin/sh
# For HDMI sound output on motherboards with chipset ALC883 or ALC888
# This script can be used to run programs every time OSS is started.
# By default, this script is disabled, and contains no commands.
# To enable, add executable permissions to this file, and edit below
# commands to be run.
rm /dev/dsp
ln -s /dev/oss/oss_hdaudio0/spdout1 /dev/dsp
vmixctl attach /dev/oss/oss_hdaudio0/spdout1 /dev/oss/oss_hdaudio0/pcmin0

exit 0
Click on System, Preferences, Sound and select OSS all over.
Reboot and you should have 1920x1080 with audio over HDMI by default

or ALSA:

To upgrade to the latest ALSA drivers do the following:
Code: You are not allowed to view links. Register or Login
sudo -s
cd /usr/local/src
touch alsaupg.sh
chmod +x alsaupg.sh
sudo gedit alsaupg.sh
copy and paste the following text, save the file
Code: You are not allowed to view links. Register or Login
#!/bin/bash
#
# AlsaUpgrade-1.0.x-rev-1.X.sh
# Note: As usual I'd like to recommend that you make a backup of your drive first. I don't guarantee for anything!
# Rev: 1.16 01-21-2009 soundcheck Changelog: added kernel-headers compile option to alsa-driver/ support of 1.0.19
# Rev: 1.17 05-10-2009 soundcheck Changelog: Added 1.0.20 support, added 2.6.29 support

##--------------------------------------------------------------------------------------------------------------------------------------
# Below package variables need to be adapted according to available package ids at [url]http://www.alsa-project.org/main/index.php/Download[/url]
# otherwise the script execution will fail!
##--------------------------------------------------------------------------------------------------------------------------------------

PACKAGE=1.0.20

alsa1020 () {
DRIVER=alsa-driver-1.0.20
FIRMWARE=alsa-firmware-1.0.20
LIB=alsa-lib-1.0.20
PLUGINS=alsa-plugins-1.0.20
UTILS=alsa-utils-1.0.20
TOOLS=alsa-tools-1.0.20
OSS=alsa-oss-1.0.17
}


#------------Ususally NO Changes to be done below this line-----------------------------------------------------------------------------------------

# script revision
REV="1.17"

#----supported kernels-----------------------------------------------------------------------------------------------------------------

KERNEL1="2.6.24" # Ubuntu kernel family
KERNEL2="2.6.26" # kernel family
KERNEL3="2.6.27" # kernel family
KERNEL4="2.6.28" # kernel family
KERNEL5="2.6.29" # kernel family

#TOOLSRC =" ac3dec as10k1 envy24control hdsploader hdspconf hdspmixer \
# mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
# us428control usx2yloader vxloader echomixer ld10k1 qlo10k1"
#


SRCDIR=/usr/src     # Sources will be stored here
ALSASRCDIR=${SRCDIR}/alsa # Packages will be stored here
NOW=`date '+%m%d%y-%H.%M'`
DATE=`date`
LOGFILE=/var/log/AlsaUpgradeRev-$REV-$NOW.log
KERNEL=`uname -r`
CURRENTPACKAGE=`cat /proc/asound/version | awk '{ print $7 }'`
ALSAPACKS=" alsa-base alsa-oss alsa-utils alsa-tools alsa-tools-gui libasound2 libasound2-dev libasound2-plugins aconnectgui "
KERNELPACKS=" `dpkg -l | awk '{print $2}' | grep -e ${KERNEL}` "



#---------------------------------------------------------------------------------------------------------------------------------

#---You need to have root permissions to run the script----

if [ "$UID" -ne 0 ]
 then
 echo "Must be root to run this script..."
 exit 0
fi

package () {
echo -n "Choose Alsa Package (1) $PACKAGE default[1]: "
  read PACK
  case $PACK in
    "" ) alsa1020 ;;
    [1]   ) alsa1020 ;;
    * ) alsa1020 ;;
esac

ALSASRCDIR=${SRCDIR}/Alsa-${PACKAGE}

}


header () {
echo
echo "-------------------------------------------------------------"
echo "- ${1}"
echo "-------------------------------------------------------------"
echo

}

die () {
 echo "$1"
 exit 1 #error
}

greet () {
clear
echo
echo "--$DATE----Alsa-Upgrade-Script-$REV -----------------"
echo "- "
echo "- You'll be upgraded from $CURRENTPACKAGE to $PACKAGE. "
echo "- "
echo "- All script output is routed to $LOGFILE"
echo "- Run tail -f in a seperate terminal to follow the upgrade"
echo "- "
echo "- Reboot your machine afterwards."
echo "- "
echo "- Enjoy - meet you at ubuntuforums.org or diy-audio.com"
echo "- soundcheck"
echo "---------------------------------------------------------------------------"
echo
echo "Upgrade in progress..The process can take up to 15minutes.....Be patient!"

}


bye () {
header "Installation successfully finished!"
header "Your new ALSA version will be loaded after the next reboot..."

}

prep () {

header "Working on following Alsa packages..."
echo "Driver: $DRIVER"
echo "Library: $LIB"
echo "Plugins: $PLUGINS"
echo "Utils: $UTILS"
echo "Firmware: $FIRMWARE"
echo "OSS: $OSS"
#echo "Installing tools: $TOOLS"

#install necessary Linux packages
header "Installing packages required to build ALSA..."

apt-get install -y $ALSAPACKS
apt-get install -y build-essential libsysfs-dev libncurses5-dev gettext python-all-dev xmlto libpulse-dev libspeex-dev
apt-get install -y libavcodec-dev libavformat-dev libavutil-dev libmpeg4ip-dev liba52-0.7.4-dev
apt-get install -y linux-headers-$KERNEL

}

download () {

cd $SRCDIR

header "Downloading and extracting ALSA packages..."
wget [url]ftp://ftp.alsa-project.org/pub/driver/[/url]$DRIVER.tar.bz2 && tar -xjf $DRIVER.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/firmware/[/url]$FIRMWARE.tar.bz2 && tar -xjf $FIRMWARE.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/lib/[/url]$LIB.tar.bz2 && tar -xjf $LIB.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/plugins/[/url]$PLUGINS.tar.bz2 && tar -xvf $PLUGINS.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/utils/[/url]$UTILS.tar.bz2 && tar -xjf $UTILS.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/tools/[/url]$TOOLS.tar.bz2 && tar -xjf $TOOLS.tar.bz2
wget [url]ftp://ftp.alsa-project.org/pub/oss-lib/[/url]$OSS.tar.bz2 && tar -xvf $OSS.tar.bz2

rm alsa*.tar.bz2
rm -rf $ALSASRCDIR
mkdir -p $ALSASRCDIR && mv alsa-* $ALSASRCDIR

}


compile () {

header "Prepare for compilation and installation..."

test -d $ALSASRCDIR || die "$ALSASRCDIR not found"

cd $ALSASRCDIR

test -d $DRIVER || die "$DRIVER not found"
test -d $FIRMWARE || die "$FIRMWARE not found"
test -d $LIB || die "$LIB not found"
test -d $PLUGINS || die "$PLUGINS not found"
test -d $UTILS || die "$UTILS not found"
test -d $TOOLS || die "$TOOLS not found"
test -d $OSS || die "$OSS not found"


#alsa-driver Note: Driver to be installed before library
header "Compiling drivers..."
cd $ALSASRCDIR/$DRIVER
make clean
./configure --with-kernel=/usr/src/linux-headers-$KERNEL --with-cards=all --with-card-options=all --with-sequencer=yes --with-oss=yes --prefix=/usr || die "$DRIVER configure failed"
#./configure --with-cards=usb-audio,hda-intel,emu10k1,hrtimer,rtctimer,hpet --with-card-options=all --with-sequencer=yes --with-oss=yes --with-kernel=/usr/src/linux --prefix=/usr || die "$DRIVER configure failed"
make || die "$DRIVER make failed"

#alsa-lib
header "Compiling library..."
cd $ALSASRCDIR/$LIB
make clean
./configure --prefix=/usr || die "$LIB configure failed"
make || die "$LIB make failed"

#alsa-plugins
header "Compiling plugins..."
cd $ALSASRCDIR/$PLUGINS
make clean
./configure --prefix=/usr || die "$PLUGINS configure failed"
make || die "$PLUGINS make failed"

#alsa-firmware
header "Compiling firmware..."
cd $ALSASRCDIR/$FIRMWARE
make clean
./configure --prefix=/usr || die "$FIRMWARE configure failed"
make || die "$FIRMWARE make failed"

## utils will be compiled and installed later on, since lib needs to be installed first

#alsa-oss
header "Compiling OSS..."
cd $ALSASRCDIR/$OSS
make clean
./configure --prefix=/usr || die "$OSS configure failed"
make || die "$OSS make failed"


#alsa-tools if you need any of the tools you need to select and install them one by one manually - look up the respective directory within /usr/src/alsa/alsa-tools*/
#header "Compiling tools..."

#
#cd $ALSASRCDIR/$TOOLS
#for i in $TOOLSRC ; do
# cd $i
# if [ -x ./configure ]; then \
# make clean  
# ./configure --prefix=/usr || die "$Tools $i configure failed"
# make || die "$Tools $i make failed"
# fi


}

installation () {

header "Installing all modules..."

header "Installing driver..."
cd $ALSASRCDIR/$DRIVER
make install
header "Installing library..."
cd $ALSASRCDIR/$LIB
make install
header "Installing plugins..."
cd $ALSASRCDIR/$PLUGINS
make install
header "Installing firmware..."
cd $ALSASRCDIR/$FIRMWARE
make install
header "Installing OSS..."
cd $ALSASRCDIR/$OSS
make install

#
#alsa-utils need to be compiled after lib installation!!
#

header "Compiling utils..."
cd $ALSASRCDIR/$UTILS
make clean
header "Compiling utils..."
./configure --prefix=/usr
make
header "Installing utils..."
make install

#
#alsa-tools not yet ready!!
#

#cd $ALSASRCDIR/$TOOLS
#for j in $TOOLSRC ; do
# cd $j
# header "Installing tool $i"
# make install
# fi

#
#copy modules to respective kernel!!
#


cd ${ALSASRCDIR}/${DRIVER}/

find ./ -name ''*.ko'' > /tmp/alsa_manifest

header "Copy modules to target directories..."

#This block of code works with 2.6.24-x Ubuntu standard kernels
if [ "`uname -a| grep ${KERNEL1} `" != "" ] ; then
 tar -cv -T /tmp/alsa_manifest -f /lib/modules/`uname -r`/ubuntu/sound/alsa-driver/${DRIVER}.tar
 cd /lib/modules/`uname -r`/ubuntu/sound/alsa-driver
fi

#This block of code works with 2.6.26-x kernels
if [ "`uname -a| grep ${KERNEL2} `" != "" ] ; then
 tar -cv -T /tmp/alsa_manifest -f /lib/modules/`uname -r`/kernel/sound/${DRIVER}.tar
 cd /lib/modules/`uname -r`/kernel/sound/
fi

#This block of code works with 2.6.27 kernels
if [ "`uname -a| grep ${KERNEL3} `" != "" ] ; then
 tar -cv -T /tmp/alsa_manifest -f /lib/modules/`uname -r`/kernel/sound/${DRIVER}.tar
 cd /lib/modules/`uname -r`/kernel/sound/
fi

#This block of code works with 2.6.28 kernels
if [ "`uname -a| grep ${KERNEL4} `" != "" ] ; then
 tar -cv -T /tmp/alsa_manifest -f /lib/modules/`uname -r`/kernel/sound/${DRIVER}.tar
 cd /lib/modules/`uname -r`/kernel/sound/
fi

#This block of code works with 2.6.29 kernels
if [ "`uname -a| grep ${KERNEL5} `" != "" ] ; then
 tar -cv -T /tmp/alsa_manifest -f /lib/modules/`uname -r`/kernel/sound/${DRIVER}.tar
 cd /lib/modules/`uname -r`/kernel/sound/
fi

#Extract new modules, overwriting old ones
tar -xvf ${DRIVER}.tar
rm *.tar

depmod -a

chmod a+rw /dev/dsp /dev/mixer /dev/sequencer /dev/midi /dev/snd/*

####alsa-utils patch for asound.state to avoid patching alsa-utils, see below debian patch - ####
##[url]http://svn.debian.org/wsvn/pkg-alsa/trunk/alsa-utils/debian/patches/move_asound_state_to_var.patch?op=file&rev=0&sc=0[/url]

cd /var/lib/alsa
rm asound.state
ln -s /etc/asound.state asound.state

}


restorealsa () {
for y in ${KERNELPACKS} ; do
header "Package ${y} will be reinstalled"
apt-get -y --reinstall install $y
done

for k in ${ALSAPACKS} ; do
header "Package ${k} will be reinstalled"
apt-get -y --reinstall install $k
done
depmod -a
}

downloadsnapshot () {
test -d $ALSASRCDIR || die "$ALSASRCDIR not found"
cd $ALSASRCDIR
test -d $DRIVER || die "$DRIVER not found"
mv $DRIVER $DRIVER.old
wget [url]ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz[/url]
test -f alsa-driver-snapshot.tar.gz || die "Download of snapshot didn't work"
tar xvvf alsa-driver-snapshot.tar.gz
mv alsa-driver $DRIVER
rm alsa-driver-snapshot.tar.gz
}

usage() {
  echo "
Usage: $0 [OPTION]...

Available options:
  -di  Download (to /usr/src), compile and install the packages
     This option will compeletely upgrade your ALSA in one step
  -d   Download the packages only
     In case you want to tweak/patch the official packages or
     you'd like to install the snapshot on top of the official
     packages prior to compiling and installating them  
  -c   Compilation only
     Kind of dry-run option to see if the configuration and compilation
     works
  -i   Compilation and installation of packages
     Sources must exist under /usr/src. Run script with -d or -di options first.
     The option is useful to speed up your installation in case Ubuntu upgrades
     have overwritten your ALSA installation. It is also useful if you want to
     keep your patched version or snapshot version, when reinstalling the packages
  -r   Restore ALSA
     Kernel and all ALSA relevant Ubuntu packages will be restored
     (done by re-installation of relevant packages)
  -snap Download, compile and install of latest ALSA driver-sources-snapshot
     Please run script using -d option first. Recommended for troubleshooting.
     (The snapshot is not an offical ALSA release or even pre-release,
      it is the latest snapshot taken from the design-tree!)
  -h   Help - this page

Please visit [url]http://ubuntuforums.org/showthread.php?t=962695[/url]
to report any issues you might encounter by using this script.
"
  exit 1;
}


#--- main ----

case "$1" in
 -di)
    header "Alsa will be downloaded and installed"
    package
    greet
    exec 1>${LOGFILE} 2>&1
    prep
    download
    compile
    installation
    bye  
    ;;
 -d)
    header "Alsa will be downloaded only"
    package
    greet
    exec 1>${LOGFILE} 2>&1
    prep
    download  
    ;;
 -c)
    header "Alsa will be compiled"
    package
    greet
    exec 1>${LOGFILE} 2>&1
    prep
    compile
    ;;

 -i)
    header "Alsa will be compiled and installed"
    package
    greet
    exec 1>${LOGFILE} 2>&1
    prep
    compile
    installation
    bye
    ;;

 -r)  
    header "Alsa will be restored. You'll get a maiden version from Ubuntu repositories"
    exec 1>${LOGFILE} 2>&1
    restorealsa
    ;;
 
 -snap)
    header "The latest Alsa-driver snapshot will be downloaded,compiled and installed"
    package
    greet
    exec 1>${LOGFILE} 2>&1
    downloadsnapshot
    compile
    installation
    bye
    ;;
 
 -h)
    usage
    exit 1
    ;;
 *)
    usage
    exit 1
    ;;
esac

exit 0


##----Script End ----
Code: You are not allowed to view links. Register or Login
./alsaupg.sh -di
reboot
Now to test audio over HDMI is working type this:
Code: You are not allowed to view links. Register or Login
speaker-test -Dplughw:0,3 -c2You should hear some static noise (that means it works)
You could also try

wget
Code: You are not allowed to view links. Register or Login
http://www.vorbis.com/music/Epoq-Lepidoptera.oggaplay -Dplughw:0,3 Epoq-Lepidoptera.ogg
Code: You are not allowed to view links. Register or Login
sudo gedit ~/.asound.asound.conf
Code: You are not allowed to view links. Register or Login
defaults.pcm.device 34. Install this driver and firmware ONLY if you have a Hauppauge WinTV NOVA-HD-S2
S2-API is the driver standard that will work out of the box starting with kernels 2.6.2
Code: You are not allowed to view links. Register or Login
WARNING: VDR 1.7.10 supports S2-API natively (if for some reason you want multiproto instead of S2-API, install VDR 1.7.0 instead)First the firmware... (thanks to Ahmed Y Shaheem for the tip)
Code: You are not allowed to view links. Register or Login
sudo -s
apt-get install unrar -y
rm /lib/firmware/dvb-fe-c*
cd /usr/local/src
wget [url]http://www.hauppauge.de/software/mce/88x_2_122_26109_WHQL.zip[/url]
unzip -jo 88x_2_122_26109_WHQL.zip Driver88/hcw88bda.sys
dd if=hcw88bda.sys of=dvb-fe-cx26109.fw skip=75504 bs=1 count=32501
cp dvb-fe-cx26109.fw /lib/firmware/
rm /lib/firmware/dvb-fe-cx24116.fw
ln -s /lib/firmware/dvb-fe-cx26109.fw /lib/firmware/dvb-fe-cx24116.fw
And now the driver.
Code: You are not allowed to view links. Register or Login
apt-get install build-essential
apt-get install mercurial cvs subversion libncurses-dev
cd /usr/local/src
hg clone [url]http://mercurial.intuxication.org/hg/s2-liplianin/[/url]
cd s2-liplianin
cd linux/include/linux
ln -s /usr/src/linux-headers-`uname -r`/include/linux/compiler.h ./
cd ../../../
make distclean
make
make install
depmod -a
reboot
You know you have the drivers installed and running when under
/dev/dvb/adapter0/ you see:
Code: You are not allowed to view links. Register or Login
crw-rw----+ 1 root video 212, 1 2009-03-15 16:22 demux0
crw-rw----+ 1 root video 212, 2 2009-03-15 16:22 dvr0
crw-rw----+ 1 root video 212, 0 2009-03-15 16:22 frontend0
crw-rw----+ 1 root video 212, 3 2009-03-15 16:22 net0
5. w_scan: Scan util
Time to test your hardware is so far all working
Open the terminal
Code: You are not allowed to view links. Register or Login
cd Desktop
download from here preferably:
[url]http://www.ziddu.com/download/6797072/w_scan-20091004.tar.rar.html[/url]

wget [url]http://wirbel.htpc-forum.de/w_scan/w_scan-20091004.tar.bz2[/url]
tar jxvf w_scan-20090528.tar.bz2
cd w_scan-20090528.tar.bz2
cp w_scan /usr/local/bin/
mkdir /etc/vdr
# Next line will scan dvb-s and dvb-s2 channels on Astra1
w_scan -fs -s S19E2 -o7 >> /etc/vdr/channels.conf
NOTE: wierbel scan is the best satellite scanner,current versions support Cable, Terrestrial even rotors and DVB-S2 channels!
An English Howto for w_scan can be found here
The latest w_scan can be found here

open the newly created channels.conf and check it does contain lots of channels

6. FFmpeg
This little piece of software is part or the better known VLC
We are about to compile our own. You can find more info on HOWTO: Install and use the latest FFmpeg and x264
but for vdr we also need --enable-postproc which is not part of that ffmpeg Howto, but otherwise a useful reference guide if you need
more info on compiling x264
Code: You are not allowed to view links. Register or Login
cd /usr/local/src
sudo -s
apt-get build-dep ffmpeg
rm -rf /usr/include/ffmpeg
sudo rm /usr/local/bin/ffmpeg
apt-get install build-essential libx264-dev libmp3lame-dev libfaad-dev libxvidcore4-dev
apt-get install mercurial cvs subversion libncurses-dev
apt-get install autoconf libtool automake pkg-config gettext libfaac-dev
apt-get install liba52-0.7.4-dev libvorbis-dev zlib1g-dev libpng12-dev libx11-dev libxv-dev libasound2-dev
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/
#in next line if you have trouble compiling it try removing --enable-shared
./configure --prefix=/usr --enable-gpl --enable-nonfree --enable-postproc --enable-libmp3lame --enable-libvorbis --enable-pthreads --enable-libx264 --enable-libtheora --enable-libfaac --enable-libfaad --enable-libxvid --enable-shared

make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default
ldconfig -v
7. Xine-Lib 1.2 CVS:
Here is my patched xine-lib1.2.deb package
Code: You are not allowed to view links. Register or Login
http://www.ziddu.com/download/499596...Dx386.rar.htmlwith vdpau and faster zapping.
If it works for you great, else compile your own as per the instructions following.
NOTE:
Don't download the vdpau patch for xinelib directly from the wget line.
The maintainer keeps the patch update with the xinelib main version. Just have a look to his page:
Code: You are not allowed to view links. Register or Login
http://www.jusst.de/vdpau/files/xine-lib-1.2/?C=M;O=Dand download the latest patch.
Code: You are not allowed to view links. Register or Login
cd /usr/local/src
apt-get install libcdio-dev libvcdinfo-dev

hg clone [url]http://hg.debian.org/hg/xine-lib/xine-lib-1.2[/url]
#You could instead download a tar ball, see next line but then you need patching or vdr-xine won´t compile
#wget [url]http://home.vrweb.de/~rnissl/xine-lib-cvs-20090412200000.tar.bz2[/url]
#tar jxvf xine-lib-cvs-20090412200000.tar.bz2
cd xine-lib-1.2
#The next 3 lines only if you want vdpau support
wget [url]http://www.jusst.de/vdpau/files/xine-lib-1.2/xine-lib-1.2-vdpau-r262.diff.bz2[/url]
bunzip2 xine-lib-1.2-vdpau-r262.diff.bz2
patch -p1 < ./xine-lib-1.2-vdpau-r262.diff
#Next 5 lines are optional, only if you want windows codecs in
#which case append --enable-w32dll --with-w32-path=/usr/local/lib/win32 to the xine-lib autogen line
wget [url]http://www8.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2[/url]
tar xivf essential-20071007.tar.bz2
mv essential-20071007 /usr/local/lib/win32
ln -s /usr/local/lib/win32 /usr/local/lib/codecs
#end of optional code, if you followed the optional lines append the parameters to the next line
./autogen.sh --prefix=/usr --with-external-ffmpeg --disable-dxr3
make -j6
checkinstall --fstrans=no --install=yes --pkgname=libxine2-dev --pkgversion "1.2.svn`date +%Y%m%d`-12ubuntu3"
ldconfig -v
If make fails then edit gedit /usr/local/src/xine-lib-1.2/src/audio_dec Look for -ldts_pic and add -lm after it.
8. Xine-UI-cvs
Code: You are not allowed to view links. Register or Login
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 [url]http://home.vrweb.de/~rnissl/xine-ui-cvs-20090617220000.tar.bz2[/url]
tar jxvf xine-ui-cvs-20090617220000.tar.bz2
cd xine-ui
# in the next line personally I don´t use --enable-vdr-keys but you can add it if you need it
./autogen.sh --prefix=/usr
make
make install
To configure the Hauppauge remote control that comes with the NOVA HD-S2
Code: You are not allowed to view links. Register or Login
sudo dpkg-reconfigure lirc  1. Select Hauppauge Nova-T 500, press next
  2. Select None, press next
  3. Select something ending with --event-ir, press ENTER

mine looks like this:
/dev/input/by-path/pci-0000:01:0a.0--event-ir

Either the Nova-T 500 remote is not identical to the Nova-HD-S2 one
or the config files for the Nova-T 500 are buggy, but some 10 keys were dead.
Create the next 5 files to have a fully working Hauppaugge Nova-HD-S2 RCU

The following file is ONLY for the Hauppaugge Remote that comes with the NOVA-HD-S2.If your remote is not the one that comes with the Hauppagge S2-HD check this for help

nastavlja se

Offline antox

  • Ferengi
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 16798
Re: HTPC DVB-S2 VDR 1.7.5 CCcam Howto ..ubuntu
« Reply #1 on: December 04, 2009, 10:35:06 PM »
The following file is ONLY for the Hauppaugge Remote that comes with the NOVA-HD-S2.If your remote is not the one that comes with the Hauppagge S2-HD check this for help
Code: You are not allowed to view links. Register or Login
sudo gedit /etc/udev/rules.d/55-local.rules
Code: You are not allowed to view links. Register or Login
KERNEL=="event*", ATTRS{vendor}=="0x14f1", SYMLINK="input/irremote"
[/p]
The next file will ensure lirc has full access to your Hauppaugge Remote
Code: You are not allowed to view links. Register or Login
sudo gedit /usr/share/hal/fdi/preprobe/20thirdparty/10-ignore-cx88-ir.fdi
Code: You are not allowed to view links. Register or Login





true



The next 4 files will basically leave the remote that came with your Hauppaugge NOVA-HD-S2 fully configured
with all keys working as they should

Code: You are not allowed to view links. Register or Login
mkdir -p /etc/vdr/plugins
sudo gedit /etc/vdr/keymacros.conf

Code: You are not allowed to view links. Register or Login
# Remote control key macros for VDR
# Format:
# macrokey key1 key2 key3...
# macrokey @plugin key1 key2 key3...
# See man vdr(5)

Red    Recordings
Green   Schedule
Yellow  Info
Blue   Timers

Code: You are not allowed to view links. Register or Login
sudo gedit /etc/vdr/remote.conf
Code: You are not allowed to view links. Register or Login
LIRC.Ok     Enter
LIRC.0     0
LIRC.1     1
LIRC.2     2
LIRC.3     3
LIRC.4     4
LIRC.5     5
LIRC.6     6
LIRC.7     7
LIRC.8     8
LIRC.9     9
LIRC.Menu    NextSong
LIRC.Back    BackExit
LIRC.Red    Red
LIRC.Green   Green
LIRC.Yellow   Yellow
LIRC.Blue    Blue
LIRC.Info    Menu
LIRC.Stop    Stop
LIRC.Record   Record
LIRC.Play    Play
LIRC.Pause   Pause
LIRC.FastFwd  Fwdwind
LIRC.FastRew  Rewind
LIRC.PrevChannel PrevCh
LIRC.Volume+  VolumeUp
LIRC.Volume-  VolumeDown
LIRC.Mute    Mute
LIRC.Audio   Text
LIRC.Subtitles Sub
LIRC.Channels  TV
LIRC.Schedule  Guide
LIRC.Recordings Pictures
LIRC.Setup   PrevSong
KBD.Up     00000000001B5B41
KBD.Down    00000000001B5B42
KBD.Menu    000000000000006D
KBD.Ok     000000000000000D
KBD.Back    000000000000007F
KBD.Left    00000000001B5B44
KBD.Right   00000000001B5B43
KBD.Red    000000001B5B5B41
KBD.Green   000000001B5B5B42
KBD.Yellow   000000001B5B5B43
KBD.Blue    000000001B5B5B44
KBD.0     0000000000000030
KBD.1     0000000000000031
KBD.2     0000000000000032
KBD.3     0000000000000033
KBD.4     0000000000000034
KBD.5     0000000000000035
KBD.6     0000000000000036
KBD.7     0000000000000037
KBD.8     0000000000000038
KBD.9     0000000000000039
KBD.Play    000000001B5B5B45
KBD.Pause   0000001B5B31377E
KBD.Stop    0000001B5B31387E
KBD.Record   0000001B5B31397E
KBD.FastFwd  0000001B5B32307E
KBD.FastRew  0000001B5B32317E
KBD.Power   000000000000000A
KBD.Channel+  000000000000002B
KBD.Channel-  000000000000002D
KBD.Volume+  000000001B5B317E
KBD.Volume-  000000001B5B347E
KBD.Mute    0000000000000073
KBD.Audio   0000000000000061

Code: You are not allowed to view links. Register or Login
sudo gedit /etc/lirc/lircd.conf
Code: You are not allowed to view links. Register or Login
# brand:            Hauppauge NOVA-HD-S2
# model no. of remote control: Hauppage NOVA-HD-S2 Snowboard Shape Silver over Black
#

begin remote

 name NOVA-HD-S2
 bits      16
 eps      30
 aeps     100

 one       0   0
 zero      0   0
 pre_data_bits  16
 pre_data    0x8001
 gap     133325
 toggle_bit_mask 0x8001001C

  begin codes
     Pictures         0x016F
     Go            0x0161
     Text           0x0184
     TV            0x0179
     Videos          0x0189
     Music          0x0188
     Guide          0x016D
     Radio          0x0181
     ArrowUp         0x0067
     ArrowDown        0x006C
     ArrowLeft        0x0069
     ArrowRight        0x006A
     Enter          0x001C
     BackExit         0x00AE
     Menu           0x008B
     PrevCh          0x019C
     Mute           0x0071
     VolumeUp         0x0073
     VolumeDown        0x0072
     ChannelUp        0x0192
     ChannelDown       0x0193
    Record          0x00A7
     Stop           0x0080
     Play           0x00CF
     Pause          0x0077
     Sub           0x0172
     Power          0x0074
     Rewind          0x00A8
     Fwdwind         0x00D0
     Sleep          0x008E
     NextSong         0x00A3
     PrevSong         0x00A5
     1            0x0002
     2            0x0003
     3            0x0004
     4            0x0005
     5            0x0006
     6            0x0007
     7            0x0008
     8            0x0009
     9            0x000A
     0            0x000B
     Red           0x018E
     Green          0x018F
     Yellow          0x0190
     Blue           0x0191

 
 end codes

end remote

Code: You are not allowed to view links. Register or Login
sudo gedit /etc/lirc/hardware.conf
Code: You are not allowed to view links. Register or Login
REMOTE="Hauppauge NOVA-HD-S2"
REMOTE_MODULES=""
REMOTE_DRIVER="devinput"
# Next 2 lines will work as long as you have just 1 remote
#Both the event and the by-path value can change so this way works fine
#TEMPIREVENT=`ls /dev/input/by-path/ |grep event-ir`
#REMOTE_DEVICE="/dev/input/by-path/$TEMPIREVENT"
#Next line ONLY if you have the Hauppage NOVA-S2-HD remote control otherwise # and un# the other two before
REMOTE_DEVICE="/dev/input/irremote"
REMOTE_LIRCD_CONF="/etc/lircd.conf"
REMOTE_LIRCD_ARGS=""
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
START_LIRCD="true"
START_LIRCMD=""
LOAD_MODULES=""
LIRCMD_CONF=""
FORCE_NONINTERACTIVE_RECONFIGURATION="false"

From the terminal run irw
and press keys on your remote control, if you see stuff on the terminal as you press keys, you are doing very well indead.

Test xine works by typing xine in the terminal or create a launcher to that effect
9. VDR 1.7.10

First we create the daemon script
/etc/init.d/vdr
Code: You are not allowed to view links. Register or Login
sudo -s
touch /etc/init.d/vdr
chmod 755 /etc/init.d/vdr
gedit /etc/init.d/vdr
Paste the following text and save
Code: You are not allowed to view links. Register or Login
#!/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

Now we will download and compile VDR 1.7.10 with Extensions-Patch-72b

Code: You are not allowed to view links. Register or Login
cd /usr/local/src
apt-get install libfreetype6-dev libfontconfig1-dev libjpeg62-dev libcap-dev libncurses5-dev libncursesw5-dev liba52-0.7.4-dev libasound2-dev
wget [url]ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.10.tar.bz2[/url]
tar xivf vdr-1.7.10.tar.bz2
ln -s vdr-1.7.10 vdr
#wget [url]http://www.zulu-entertainment.de/page/klick.php?d=VDR+Extensions+Patch[/url]

mkdir VDR-Extentions-Patch-72
cd VDR-Extentions-Patch-72
wget [url]http://wbreu.htpc-forum.de/downloads/vdr1.7.10extensions.zip[/url]
unzip vdr1.7.10extensions.zip
cd ../vdr
patch -p1 < ../VDR-Extensions-Patch-72/vdr-1.7.10_extensions.diff
# Next line is just in case you just updated your kernel,do not worry if you get an error saying ´files are the same´
sudo cp /usr/src/linux-headers-`uname -r`/include/linux/compiler.h /usr/local/src/s2-liplianin/linux/include/linux/compiler.h
sudo gedit /usr/local/src/vdr/Make.config

Next copy and paste the following Make.config
Code: You are not allowed to view links. Register or Login
# $Id: Make.config by Art2003 April 2009

### 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/local/man
BINDIR  = /usr/bin

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

### The remote control:

LIRC_DEVICE = /dev/lircd
RCU_DEVICE = /dev/input/ttyS1

## Define if you want vdr to not run as root
#VDR_USER = vdr
### 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

#DVBSETUP = 1
SETUP = 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 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 TIMERCMD
DEFINES += -DUSE_TIMERCMD
endif

ifdef TIMERINFO
DEFINES += -DUSE_TIMERINFO
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

ifdef PARENTALRATING
DEFINES += -DUSE_PARENTALRATING
endif

ifdef STREAMDEVEXT
DEFINES += -DUSE_STREAMDEVEXT
endif

And final bunch of commands for VDR1.7.8

Code: You are not allowed to view links. Register or Login
sudo -s
mkdir -p /media/video/vdr
mkdir -p /usr/lib/vdr/plugins
mkdir -p /usr/lib/vdr/scripts
mkdir -p /etc/vdr/plugins
make
make install
cp -a svdrpsend.pl /usr/bin
cp *.conf /etc/vdr/
10. VDR Plugins and automation (including CCcam scripts)
Back to the terminal!!:
Code: You are not allowed to view links. Register or Login
sudo -s
gedit /var/bin/runvdr

Code: You are not allowed to view links. Register or Login
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 --lirc --no-kbd -E /var/vdr -l 3 \
    -P sc \
    -P femon \
    -P setup \
    -P skinreel \
    -P xine \
    -P wirbelscan \
    -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

Code: You are not allowed to view links. Register or Login
chmod 755 /var/bin/runvd
(optional)Femon - Signal Information plugin
Code: You are not allowed to view links. Register or Login
http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin
Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
wget [url]http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/vdr-femon-1.7.2.tgz[/url]
tar xzvf vdr-femon-1.7.2.tgz
ln -s femon-1.7.2 femon
cd /usr/local/src/vdr/
make plugins
make install

(optional)Streamdev plugin (needed only if you plan to use XBMC)
Code: You are not allowed to view links. Register or Login
http://streamdev.vdr-developer.org/
Code: You are not allowed to view links. Register or Login
STREAMDEVEXT = 1
Now recompile VDR with this extension support:

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr
sudo make clean && make
cd /usr/local/src/vdr/PLUGINS/src
cvs -d:pserver:[email protected]:/var/cvsroot login
###Simply hit ENTER when asked for a password.
cvs -d:pserver:[email protected]:/var/cvsroot co -D 2/18/09 streamdev
sudo mkdir -p /etc/vdr/plugins/streamdev
cd streamdev
sudo cp streamdev/streamdevhosts.conf /etc/vdr/plugins/streamdev
sudo cp streamdev/streamdevhosts.conf /etc/vdr/vdrsvdrphosts.conf
cd /usr/local/src/vdr/
make plugins
make install

(optional)Enigma skin (looking a bit like a Dreambox with picon...)

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
wget [url]http://andreas.vdr-developer.org/enigmang/download/vdr-skinenigmang-0.0.6.tgz[/url]
tar xivf vdr-skinenigmang-0.0.6.tgz
ln -s skinenigmang-0.0.6 skinenigmang
cd /usr/local/src/vdr/
make plugins
make install
mkdir -p /etc/vdr/plugins/skinenigmang
cd /etc/vdr/plugins
wget [url]http://andreas.vdr-developer.org/enigmang/download/skinenigmang-logos-xpm-hi-20070702.tgz[/url]
wget [url]http://andreas.vdr-developer.org/enigmang/download/skinenigmang-channellogos-xpm-hi-20070702.tgz[/url]
wget [url]http://andreas.vdr-developer.org/enigmang/download/skinenigmang-fonts-20080225.tgz[/url]
tar xzvf skinenigmang-logos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-fonts-20080225.tgz

Optional - Rotor Plugin - To move a dish and store positions, gotoX, etc
REMOVE in Make.config (if it exists)the line with: * see note at foot of page
ROTOR = 1

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr
#patch -p1 < ../VDR-Extensions-Patch-72/vdr-1.7.8-ext_gotox.diff
cd PLUGINS/src
wget [url]http://ubuntuforums.org/attachment.php?attachmentid=109895&stc=1&d=1239814342[/url]
mv attachment.php?attachmentid=109895 rotor-0.1.4S2API.tar.gz
tar zxvf rotor-0.1.4S2API.tar.gz
ln -s rotor-0.1.4S2API rotor
cd ../../
make plugins
make install

sc TRUNK - softcam plugin (Needed for CCcam

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
apt-get install libssl-dev
hg clone -r trunk [url]http://85.17.209.13:6100/sc[/url]
cd /usr/local/src/vdr/
make plugins
make install
mkdir -p /etc/vdr/plugins/sc

(Optional) Setup plugin (needed if you want CCcam info or ecm.info or to be able to run bash scripts from VDR)
Make sure you have applied the Extensions patch (tested with 70) to VDR and that there is a line in Make.config
that reads:
SETUP = 1

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
sudo wget [url]http://www.zulu-entertainment.de/files/vdr-setup/vdr-setup-0.3.1-zulu-edition.tgz[/url]
sudo tar zxvf vdr-setup-0.3.1-zulu-edition.tgz
sudo ln -s setup-0.3.1-zulu-edition setup
cd setup
sudo mkdir /etc/vdr/plugins/setup
cd /usr/local/src/vdr
sudo make plugins
sudo make install

Now we create a sample menu configuration file

Code: You are not allowed to view links. Register or Login
sudo gedit /etc/vdr/plugins/setup/vdr-menu.xml
Code: You are not allowed to view links. Register or Login

 
 
 
 
 
   
   
   
   
 

 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 

 
 

And ...

Code: You are not allowed to view links. Register or Login
sudo gedit /etc/vdr/plugins/setup/vdr-setup.xml
Code: You are not allowed to view links. Register or Login

 
   
 

 
   

     

     

     

     

     

     

     

     
     
     
   

   
     
     
   

   
     
   

 

Optional) Skin Reel - VDR Skin

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
wget [url]http://rsync16.de.gentoo.org/files/vdr-skinreel/vdr-skinreel-0.0.1.tgz[/url]
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/plugins/
cd /usr/local/src/vdr/
make plugins
make install

WIRBEL SCAN - PLUGIN to scan channels VDR
Download vdr-wirbelscan-0.0.4b_20090416.tgz to /usr/local/src/vdr/PLUGINS/src
(The file is available as an attachment in this thread)

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
# It does not scan DVB-S2 channels
tar zxvf vdr-wirbelscan-0.0.4b_20090416.tgz
ln -s wirbelscan-0.0.4b_20090416 wirbelscan
cd /usr/local/src/vdr/
make plugins
make install
# Next line verifies the plugin is in its place it if shows no file then copy it
ls /usr/lib/vdr/plugins/libvdr-wirbelscan.so.1.7.8
#manually from /usr/locar/src/vdr/PLUGINGS/src/wirbelscan adding the suffix .1.7.8

XINE - VDR Xine plugin, needed for OXINE to connect to VDR

Code: You are not allowed to view links. Register or Login
cd /usr/local/src/vdr/PLUGINS/src
# vdr-xine-0.9.3 or later are compatible with VDR 1.7.8
wget [url]http://home.vrweb.de/rnissl/vdr-xine-0.9.3.tgz[/url]
tar zxvf vdr-xine-0.9.3.tgz
ln -s xine-0.9.3 xine
cd /usr/local/src/vdr/PLUGINS/xine/data
mkdir -p /etc/vdr/plugins/xine/
cp *.mpg /etc/vdr/plugins/xine/
cd /usr/local/src/vdr/
make plugins
make install

For CCcam first lets create the scripts that will run it (DO NOT RUN CCcam.x86 from the command line!)

Code: You are not allowed to view links. Register or Login
sudo -s
touch /etc/init.d/cccam
chmod 755 /etc/init.d/cccam
gedit /etc/init.d/cccam

Code: You are not allowed to view links. Register or Login
#!/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

You will need CCcam.x86 in /var/bin but this tutorial will not cover where to obtain such a file if it really exists!

Code: You are not allowed to view links. Register or Login
touch /var/bin/run.sh
chmod 755 /var/bin/run.sh
gedit /var/bin/run.sh

nastvlja se

Offline antox

  • Ferengi
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 16798
Re: HTPC DVB-S2 VDR 1.7.5 CCcam Howto ..ubuntu
« Reply #2 on: December 04, 2009, 11:23:55 PM »
And paste there the following code (and save it)

Code: You are not allowed to view links. Register or Login
#!/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

Finally the CCcam wrapper and setting CCcam to start automatically upon booting, especially handy if you are running a server
as if the process CCcam.x86 dies it will be automatically restarted

Code: You are not allowed to view links. Register or Login
touch /var/bin/ca.c
chmod 755 /var/bin/ca.c
ln -s /etc/init.d/cccam /etc/rc2.d/S50cccam
sudo cp /usr/local/src/vdr/PLUGINS/src/sc/contrib/cccam_ca.c /var/bin/ca.c

11. OXINE - The cherry on the cake

OXINE can be used as a VDR FRONTEND (able to play DVDs, Music, Video files) already patched for VDR and in a .deb format (tested under Ubuntu 8.10) Make sure you installed the XINE plugin before (see instructions above in the VDR-plugins section)
Bear in mind oxine has no vdpau support as such but since it can launch external commands (like bash scripts) it is possible to configure it to call mplayer or xine with the right set of parameters to use vdpau. I have written a few
scripts that make all this work transparently but they are not part of this tutorial.

The basic script to have xine with vdpau using oxine as the frontend is:
sudo gedit /usr/sbin/tvoxi.sh

Code: You are not allowed to view links. Register or Login
#!/bin/sh
sudo /etc/init.d/oxine stop
/usr/bin/xine -f --no-splash --no-gui -V vdpau --post vdr_video --post vdr_audio "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes"
while pidof xine >/dev/null;do
pidof vdr >/dev/null || killall -9 xine ;
sleep 10;
done
sudo killall Thunar nautilus

sudo /etc/init.d/oxine start

Code: You are not allowed to view links. Register or Login
sudo touch /etc/init.d/oxine
sudo chmod 755 /etc/init.d/oxine
sudo gedit /etc/init.d/oxine

Code: You are not allowed to view links. Register or Login
#!/bin/sh
### BEGIN INIT INFO
# Provides:     oxine
# Required-Start:  $network
# Required-Stop:   $network
# Default-Start:   2
# Default-Stop:   0 1 2 6
# Description:    Start, Stop or Restart the oxine 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 Oxine "
oxine &
    ;;
  stop)
    echo -n "Shutting down Oxine "
killall oxine
    ;;
  restart)
    echo -n "Restart Oxine "
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
esac
# rc_exit
exit 0

For vdpau in mainmenu.xml replace later on the Watch TV command with the following:

Now, we are going to install a special oxine.deb patched with VDR support (but not vdpau other than as external commands)
Download
Code: You are not allowed to view links. Register or Login
oxine-vdr-patched_0.7.1-1_i386.debNOTE:These config files assume you are logged on as user tv
If this is different please amend accordingly!!

Code: You are not allowed to view links. Register or Login
sudo apt-get install vorbis-tools flac mount
sudo apt-get build-dep oxine
sudo dpkg -i oxine-vdr-patched_0.7.1-1_i386.deb
mkdir ~/.oxine
cd /usr/local/src/ffmpeg
sudo make install

Alternative installation for oxine is the .deb does not work for you, compile your own:

Code: You are not allowed to view links. Register or Login
cd /usr/local/src
sudo -s
apt-get install libfaac-dev libfaad-dev curl imagemagick
wget [url]http://downloads.sourceforge.net/project/oxine/oxine/0.7.1/oxine-0.7.1.tar.gz?use_mirror=switch[/url]
tar zxvf oxine-0.7.1.tar.gz
cd oxine-0.7.1
./configure --prefix=/usr --disable-joystick --enable-vdr  
make
make install

Notes:

a) If oxine gives you an error about PNG files then you probably need a different ffmpeg version. This is the thing with downloading SVN sources
sometimes something is broken temporarily.


b) If you are trying this on Ubuntu 9.04 save yourself a lot of hassle and try kaffeine first, if you can get any free to air channels to work there,

then this guide for VDR is for you, otherwise do not bother.

Code: You are not allowed to view links. Register or Login
Oxine config files (to be placed in ~/.oxine/ )
Are an attachment to this post.

VDR-Screenshots


download:
Code: You are not allowed to view links. Register or Login
http://www.ziddu.com/download/6518674/vdr-1.7.9-art2003.rar.html my /usr/local/src/vdr-1.7.9 with all the plugins and patches you (probably) need

NOTES:
If you have freezing with HD channels check the following:
a) in /etc/X11/xorg.conf make sure Option "Composite" "Disabled"
b) swith to a SD channel, run this command and then try again the HD channel:

Code: You are not allowed to view links. Register or Login
sudo sh -c "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
If you are after a good channel list you can download mine from
Code: You are not allowed to view links. Register or Login
http://www.ziddu.com/download/6928415/channels.conf.rar.htmlCorrections and additions are more than welcome so that together in the true ubuntu community spirit we can build an excellent channel list!

vdr-1.7.9-art2003.rar download:
Code: You are not allowed to view links. Register or Login
http://www.ziddu.com/download/6518674/vdr-1.7.9-art2003.rar.html