当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 3 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : HOW TO:VDR 1.7.0, HDTV and CCcam with budget cards on Ubuntu
帖子发表于 : 2008-12-02 20:50 

注册: 2008-11-11 23:11
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
这是我翻译老外的文章,如果翻错也将就着看。这是原文:
http://www.eurocardsharing.com/f273/how ... 04-a-63074



HOW TO:VDR 1.7.0, HDTV and CCcam with budget cards on Ubuntu 8.04



前些日子,我将我的HTPC机从winodws转到了linux下。在此期间,我试过好多DVB接收程序,最后发现,VDR是最好的。VDR支持所有的DVB卡,刚好我有张皇视卡。在不断地测试,排错过程中,花了我4周的时间(我只能在晚上和周末调试)才完全搞定。期间还有一次硬盘损坏,不过最终还是成功装好了VDR,并且收看了有些日子了。对于为那些不想事事google的人,我特写了此文。记录下我装Hauppauge卡的过程,以下是我的硬件配置。
- 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


显示器则是一台三星的FULL HD液晶显示器。通过HDMI接口与 nvidia显卡连接,显卡已装好驱动。

声明:首先,我想声明一件事。这篇文章是关于安装VDR的,我不想说如何装其它的程序,或者如何装linux。在你将linux作为你的桌面系统和DVB平台之前掌握一定的linux知识是必要的。我用的是Xubuntu 8.04 X86版,并在装VDR之前将网卡、声卡、显卡等驱动都装好了。另,我都是在终端用apt-get命令来安装程序,所以检查一下你的软件源,最好选几个速度快的。再者,我一切操作都默认在/usr/local/src目录下的,当然,你可以换个其它的目录。文章开始之前,先确认一下你的DVB-S 或 DVB-S2卡已正常运行(被linux认出)。如果是Hauppauge NOVA-S2-HD 或 HVR-4000的用户,可以参见我另一篇文章。



注意:部分DVB卡使用VDR 1.7.0需要安装multiproto驱动!Hauppauge卡都需要ultiproto驱动。



本文里所有的命令,可以直接在终端里运行。里面所涉及的命令,最好前面加上sudo,以确保你有相应的权限运行。我的Xubuntu 8.04是X86桌面版。虽然我的CPU是AMD 64位的,最终我决定用32位版的系统。主要是因为64位还不完善。所以我还是推荐使用32版。下面正式开始:


1.安装Xine和 FFMpeg解码器


目前为止还没有一块纯硬解DVB-S2卡,因此我们需要用软解输出,一般是用xineliboutput。在安装配置VDR及其插件之前,需要先安装FFMpeg解码器 和 Xine播放器。

FFMpeg:
代码:

cd /usr/local/src
apt-get install build-essential
apt-get install mercurial cvs subversion libncurses-dev
apt-get install autoconf libtool automake pkg-config gettext
apt-get install liba52-0.7.4-dev liblame-dev libvorbis-dev zlib1g-dev libpng12-dev libx11-dev libxv-dev libasound2-dev
apt-get build-dep ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/
./configure --prefix=/usr --enable-shared --enable-gpl --enable-postproc --enable-liba52 --enable-libmp3lame --enable-libvorbis --enable-pthreads --enable-swscale
make
make install
ldconfig -v


Xine-Lib 1.2 CVS:
代码:

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/local/lib/win32
ln -s /usr/local/lib/win32 /usr/local/lib/codecs
wget http://shalafi.ath.cx/vdr/xine-lib-1_2-ffmpeg.patch
cd xine-lib-1.2
patch -p1 < ../xine-lib-1_2-ffmpeg.patch
./autogen.sh --prefix=/usr --with-external-ffmpeg --disable-dxr3 --enable-w32dll --with-w32-path=/usr/local/lib/win32
make
make install
ldconfig -v


Xine-UI CVS
代码:

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-20080310200000.tar.bz2
tar xivf xine-ui-cvs-20080310200000.tar.bz2
cd xine-ui
./autogen.sh --prefix=/usr --enable-vdr-keys
make
make install



测试 Xine是否工作正常,可以在终端里用命令行启动它。如果安装正确,这时你应该能看到Xine的图形界面了。因为是第一次运行,有些参数需要配置。当然你也可以直接跳过,以后再配置。



2.安装VDR及其插件

现在 Xine 和 FFmpeg都已经装好了,开始安装VDR了。
VDR 1.7.0
代码:

cd /usr/local/src
apt-get install libfreetype6-dev libfontconfig1-dev libjpeg62-dev libcap-dev libncurses5-dev libncursesw5-dev
wget ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.7.0.tar.bz2
tar xivf vdr-1.7.0.tar.bz2
wget http://www.linuxtv.org/pipermail/vdr/attachments/20080413/1054bcfb/attachment-0001.bin
mv attachment-0001.bin vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff.bz2
bzip2 -d vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff.bz2
cd vdr-1.7.0
patch -p1 < ../vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff
wget http://shalafi.ath.cx/vdr/Make.config
# WARNING! Edit Make.config and make sure the DVBDIR setting is correct for your configuration!
mkdir /media/video
mkdir -p /usr/lib/vdr/plugins
mkdir -p /usr/lib/vdr/scripts
mkdir -p /etc/vdr/plugins
make
make plugins
make install
cp -a svdrpsend.pl /usr/bin
cp *.conf /etc/vdr/


Xineliboutput 1.02 CVS - software output plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libextractor-dev
cvs -d:pserver:anonymous@xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput login
cvs -z3 -d:pserver:anonymous@xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput co -P vdr-xineliboutput
mv vdr-xineliboutput xineliboutput
cd xineliboutput
make
make install
mkdir -p /etc/vdr/plugins/xineliboutput
cp *.mpg /etc/vdr/plugins/xineliboutput/
cd ../../../
make plugins
make install


sc TRUNK - softcam plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libssl-dev
hg clone -r trunk http://85.17.209.13:6100/sc
cd ../../
make plugins
make install
mkdir -p /etc/vdr/plugins/sc
cd /etc/vdr/plugins/sc
wget http://shalafi.ath.cx/vdr/cardclient.conf
cd /
wget http://shalafi.ath.cx/vdr/CCcam.tar.bz2
tar xivf CCcam.tar.bz2


OSD Teletext - Teletext plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.wiesweg-online.de/linux/vdr/vdr-osdteletext-0.5.1.tgz
wget http://www.vdr-portal.de/board/attachment.php?attachmentid=13339
mv attachment.php\?attachmentid\=13339 osdteletext-0.5.1-vdr-1.5.0.diff
tar xivf vdr-osdteletext-0.5.1.tgz
mv osdteletext-0.5.1 osdteletext
cd osdteletext
patch -p1 < ../osdteletext-0.5.1-vdr-1.5.0.diff
cd ../../../
make plugins
make install
mkdir -p /vtx


Femon - Signal Information plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/vdr-femon-1.6.1.tgz
tar xzvf vdr-femon-1.6.1.tgz
mv femon-1.6.1 femon
cd ../../
make plugins
make install


Bitstreamout - AC/3 output plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libmad0-dev
wget http://heanet.dl.sourceforge.net/sourceforge/bitstreamout/vdr-bitstreamout-0.89c.tar.bz2
tar xivf vdr-bitstreamout-0.89c.tar.bz2
cd ../../
make plugins
make install


Remote - Remote plugin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.escape-edv.de/endriss/vdr/vdr-remote-0.4.0.tgz
tar xzvf vdr-remote-0.4.0.tgz
mv remote-0.4.0 remote
cd remote
sed -i Makefile -e 's/VDRVERSION/APIVERSION/g'
cd ../../
make plugins
make install


EnigmaNG - VDR Skin
代码:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://andreas.vdr-developer.org/enigmang/download/vdr-skinenigmang-0.0.6.tgz
tar xivf vdr-skinenigmang-0.0.6.tgz
mv skinenigmang-0.0.6 skinenigmang
cd ../../
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
wget http://andreas.vdr-developer.org/enigmang/download/skinenigmang-fonts-20080225.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-fonts-20080225.tgz


Skin Reel - VDR Skin
代码:

cd /usr/local/src/vdr-1.7.0/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
mv skinreel-0.0.1 skinreel
cd skinreel
sed -i Makefile -e 's/VDRVERSION/APIVERSION/g'
cp -r skinreel /etc/vdr/plugins/
cd ../../../
make plugins
make install



3.配置

VDR的插件都已经装好了,先来配置一下。

3.1VDR 及其插件

/usr/bin/vdr 这个命令很的用,它可以让你对VDR用其插件有一个总览,这些信息对配置VDR非常有用。为了让VDR启用更简便,我们在 /var/bin/建一个启动脚本,输入以下内容。
代码:

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'xineliboutput -l none -r 37890 -p' \
        -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



重点关注一下-P参数,如果要启用一个插件就在它后面加一个-P就行了。另也请注意一下xineliboutput语句,我们可以加特别参数来以加载插件来启动VDR。在终端里加上 --help参数,可以看到所有的语法参数。有一个插件可能比较有用,就是遥控插件。我用的是Hauppauge自带的遥控。利用系统的输入接口,加载遥控插件就能使用遥控器了。许多DVB卡都自带了遥控器,你也可以加载插件来使用遥控器。如果想要为遥控器找到正确的系统代码地址,作以下操作:

代码:

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



如上所示,我的遥控在系统里的链接是 pci-0000:01:06.0--event-ir (or /dev/input/event7),这就是VDR里遥控插件所要用到的。我不用/dev/input/event7这个链接因为如果有新设备加载的时候,这个值可能会变。但PCI的ID不会变,用PCI的ID一劳永逸。当然,你也可以使用lircd驱动。用MCE遥控器就需要lircd驱动。在编译xine-ui的时候,就把lircd驱动编译进去了。如果没有也没关系,用命令行dpkg-reconfigure lirc-modules-source重新编译一下就行了。然后修改一下runvdr文件,让它每次启动VDR时自动回载lircd驱动。

代码:

-P'remote -l /dev/lircd' \


3.2. DISEqC

像我的情况,我的锅装了四个高频头,分别收视19.2e, 13.0e, 23.5e, 28.2e 和 28.5e。然后接在一个DISEqC 1.0的开关上用以切换。要在VDR下使用DISEqC切换开关,有两个步骤。编辑/etc/vdr/diseqc.conf文件,并在VDR里启用DISEqC切换开关。下面以我的DISEqC配置文件为例来说明一下DISEqC配置文件的编写。
代码:

# 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



现在还别急着去编写这个文件。要先在VDR里启用DISEqC,在VDR的主界面里,选择configured然后 Setup再到 LNB设置 在先项中看到 DISEqC 选择Yes,再按OK。


3.3. CCcam 和 sc 插件


当你装好sc插件之后,也附带装好了我编写的CCcam控制脚本。请注意, 使用CCcam需要sc插件可以读写频道文件。为了操作便利,我编写了脚本用来启动、停止和重启cccam(/etc/init.d/cccam) 。例如:/etc/init.d/cccam start命令将启动cccam,实际上它是/var/bin/run.sh命令来运行脚本启动cccam到调试模式。注意:不要去运行CCcam.x86二进制文件,用run.sh命令来运行它。


还要注意一点,启动VDR之前要先启动CCcam,完全启动CCcam要有一点时间。若想配置CCcam就编辑/var/etc/CCcam.cfg文件。我们已经装好了sc插件,有些朋友可能已经注意到,在/etc/vdr/plugins/sc/已经生成了一个叫cardclient.conf的文件。这个配置文件默认是使用CCcam,所有的解密请求就将通过当前配置送与CCcam解密。当然,你可以加上诸如 newcamd, gbox, camd3等等协议。只是记得,最上面的协议优先使用。



3.4.Channels.conf

默认的频道列表文件是空白的,只有 Astra 19.2e 上的FTA频道。如果想增加其它频道,可以从VDR的主页里下载频道文件。想要多星的频道文件,用cat命令将相应的文件合起来就是了(例如:cat all.conf >> /var/etc/channels.conf)频道文件是纯文本存储,所以你可以把频道名改成自己喜欢的。但要记得在VDR关闭后再编辑,否则编好的文件会被当前的覆盖。每个频道信息都以 :->超始,依次是高频头,转发器,卫星。你还可以所你自己的个性信息加在直播商里。要显示个性信息,在收看节目时按你左右键,再按OK就行了。


3.5.运行VDR

如果你已按我上面的脚本新建了 runvdr 文件,我们可以启动VDR了。为了更方便,我把它加到 init.d里让它自启动(路径:/etc/init.d/vdr)。start, stop 和 restart可以启动,停止,重启VDR。日志文件保存在/var/log/user.log,如果运行出错,可以查看为个日志文件以获得详细信息。我们使用 xineliboutput 输出插件,以vdr-sxfe作为收视的前端。启动vdr-sxfe之前,先编辑一下 /etc/vdr/svdrphosts.conf里面的网络设置。要启动vdr-sxfe,先进入桌面环境,打开终端,输入以下命令:
代码:

vdr-sxfe --video=xv --aspect=16:9 --fullscreen --width=1280 --height=720 --nokbd --post=tvtime:method=Linear,cheap_mode=1,pulldown=0,use_progressive_frame_flag=1



把这些命令复制粘贴后, vdr-sxfe已经启动了。可以自己用鼠标调整长宽(我是调成了1280x720@60Hz)。想更爽一点,你可以用oxine 或 Linux MMS作为收视前端,不过,这不在本文讨论的范围之内了。第一次启动VDR,需要配置遥控。按下遥控上的任意键,跟着屏幕上的提示操作下去就是了,很容易的。

4.结语

VDR是强大的,并且可以通过插件来扩展其功能。我希望你用了常用的一插件。如想确认一下你用了哪些插件,可以进到配置栏里看看,大部分插件都有配置选项。在VDR的主界面里,进入到 Setup里,选择plugins,选择想要配置的插件对其进行配置。配置好后要按OK键确认保存,不然一切都白费了。保存后,重启VDR也生效。如果遇到不能收看HDTV或者无法锁定信号,先检查一下这些东西,先看看有没有EPG。如果没有,检查一下频道列表里的转发器设置,在频道列表里,选择好频道,按红色按扭进行编辑。卫星参数可上网查得。编辑完后,要等一会才生效。不用多久,就能看到了。说到HDTV,你可以修改下面这些选项来用ffmpeg解h264格式的节目,这个文件在目录$HOME/.xine/config 下,修改时要关掉VDR。
代码:

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



谢谢你阅读本文,在这里我要感谢很多人,特别是 cr0w。如果喜欢本文,请为本贴投感谢票。


页首
 用户资料  
 
2 楼 
 文章标题 : Re: HOW TO:VDR 1.7.0, HDTV and CCcam with budget cards on Ubuntu
帖子发表于 : 2008-12-02 20:51 

注册: 2008-11-11 23:11
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
Introduction

Since a couple of weeks I've converted my Windows based HTPC completely to a Linux based HTPC. During this process, I've tried several DVB applications but because of HDTV and cardsharing, I found out that the Video Disk Recorder project is the one of the best application for DVB-viewing. But VDR is primary used for full DVB cards, while I got a budget card.

During this trial-and-error, it took me around 4 weeks (I could only work on it on several nights or in weekends) to get it completely working. But during a HDD crash I found out I had to do it again. Now I can get VDR up-and-running in a couple of hours.

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 Samsung HD-Ready LCD-TV 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 8.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.0, you require the multiproto drivers and they must be downloaded installed! I use Igor's repo myself and this works with VDR 1.7.0. This tutorial works for DVB-S and DVB-S2 based budget cards and also DVB-S budget cards require multiproto, 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 8.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 libncurses-dev
apt-get install autoconf libtool automake pkg-config gettext
apt-get install liba52-0.7.4-dev liblame-dev libvorbis-dev zlib1g-dev libpng12-dev libx11-dev libxv-dev libasound2-dev
apt-get build-dep ffmpeg
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg/
./configure --prefix=/usr --enable-shared --enable-gpl --enable-postproc --enable-liba52 --enable-libmp3lame --enable-libvorbis --enable-pthreads --enable-swscale
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/releas ... 07.tar.bz2
tar xivf essential-20071007.tar.bz2
mv essential-20071007 /usr/local/lib/win32
ln -s /usr/local/lib/win32 /usr/local/lib/codecs
wget http://shalafi.ath.cx/vdr/xine-lib-1_2-ffmpeg.patch
cd xine-lib-1.2
patch -p1 < ../xine-lib-1_2-ffmpeg.patch
./autogen.sh --prefix=/usr --with-external-ffmpeg --disable-dxr3 --enable-w32dll --with-w32-path=/usr/local/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-cv ... 00.tar.bz2
tar xivf xine-ui-cvs-20080310200000.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.0
Code:

cd /usr/local/src
apt-get install libfreetype6-dev libfontconfig1-dev libjpeg62-dev libcap-dev libncurses5-dev libncursesw5-dev
wget ftp://ftp.cadsoft.de/vdr/Developer/vdr-1.7.0.tar.bz2
tar xivf vdr-1.7.0.tar.bz2
wget http://www.linuxtv.org/pipermail/vdr/at ... t-0001.bin
mv attachment-0001.bin vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff.bz2
bzip2 -d vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff.bz2
cd vdr-1.7.0
patch -p1 < ../vdr-1.7.0-h264-syncearly-framespersec-audioindexer-fielddetection-speedup.diff
wget http://shalafi.ath.cx/vdr/Make.config
# WARNING! Edit Make.config and make sure the DVBDIR setting is correct for your configuration!
mkdir /media/video
mkdir -p /usr/lib/vdr/plugins
mkdir -p /usr/lib/vdr/scripts
mkdir -p /etc/vdr/plugins
make
make plugins
make install
cp -a svdrpsend.pl /usr/bin
cp *.conf /etc/vdr/

Xineliboutput 1.02 CVS - software output plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libextractor-dev
cvs -d:pserver:anonymous@xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput login
cvs -z3 -d:pserver:anonymous@xineliboutput.cvs.sourceforge.net:/cvsroot/xineliboutput co -P vdr-xineliboutput
mv vdr-xineliboutput xineliboutput
cd xineliboutput
make
make install
mkdir -p /etc/vdr/plugins/xineliboutput
cp *.mpg /etc/vdr/plugins/xineliboutput/
cd ../../../
make plugins
make install

sc TRUNK - softcam plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libssl-dev
hg clone -r trunk http://85.17.209.13:6100/sc
cd ../../
make plugins
make install
mkdir -p /etc/vdr/plugins/sc
cd /etc/vdr/plugins/sc
wget http://shalafi.ath.cx/vdr/cardclient.conf
cd /
wget http://shalafi.ath.cx/vdr/CCcam.tar.bz2
tar xivf CCcam.tar.bz2

OSD Teletext - Teletext plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.wiesweg-online.de/linux/vdr/ ... -0.5.1.tgz
wget http://www.vdr-portal.de/board/attachme ... ntid=13339
mv attachment.php\?attachmentid\=13339 osdteletext-0.5.1-vdr-1.5.0.diff
tar xivf vdr-osdteletext-0.5.1.tgz
mv osdteletext-0.5.1 osdteletext
cd osdteletext
patch -p1 < ../osdteletext-0.5.1-vdr-1.5.0.diff
cd ../../../
make plugins
make install
mkdir -p /vtx

Femon - Signal Information plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.saunalahti.fi/~rahrenbe/vdr/ ... -1.6.1.tgz
tar xzvf vdr-femon-1.6.1.tgz
mv femon-1.6.1 femon
cd ../../
make plugins
make install

Bitstreamout - AC/3 output plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
apt-get install libmad0-dev
wget http://heanet.dl.sourceforge.net/source ... 9c.tar.bz2
tar xivf vdr-bitstreamout-0.89c.tar.bz2
cd ../../
make plugins
make install

Remote - Remote plugin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://www.escape-edv.de/endriss/vdr/vd ... -0.4.0.tgz
tar xzvf vdr-remote-0.4.0.tgz
mv remote-0.4.0 remote
cd remote
sed -i Makefile -e 's/VDRVERSION/APIVERSION/g'
cd ../../
make plugins
make install

EnigmaNG - VDR Skin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://andreas.vdr-developer.org/enigma ... -0.0.6.tgz
tar xivf vdr-skinenigmang-0.0.6.tgz
mv skinenigmang-0.0.6 skinenigmang
cd ../../
make plugins
make install
mkdir -p /etc/vdr/plugins/skinenigmang
cd /etc/vdr/plugins
wget http://andreas.vdr-developer.org/enigma ... 070702.tgz
wget http://andreas.vdr-developer.org/enigma ... 070702.tgz
wget http://andreas.vdr-developer.org/enigma ... 080225.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-channellogos-xpm-hi-20070702.tgz
tar xzvf skinenigmang-fonts-20080225.tgz

Skin Reel - VDR Skin
Code:

cd /usr/local/src/vdr-1.7.0/PLUGINS/src
wget http://rsync16.de.gentoo.org/files/vdr- ... -0.0.1.tgz
tar xzvf vdr-skinreel-0.0.1.tgz
mv skinreel-0.0.1 skinreel
cd skinreel
sed -i Makefile -e 's/VDRVERSION/APIVERSION/g'
cp -r skinreel /etc/vdr/plugins/
cd ../../../
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 installed the script /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'xineliboutput -l none -r 37890 -p' \
-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. Also look closely to for instance xineliboutput how we can add plugin specific options to the startup of VDR. 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 also installed some of my scripts and certain 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, I created a init.d script called cccam (/etc/init.d/cccam) which 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 may have notices you also downloaded a file called cardclient.conf (full location: /etc/vdr/plugins/sc/cardclient.conf). This configuration file is allready configured for use with CCcam. 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 I made a init.d script called vdr (full location: /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 xineliboutput plugin, we use the vdr-sxfe frontend to watch the VDR output. Before starting vdr-sxfe, you might want to edit the /etc/vdr/svdrphosts.conf file to include your network configuration.

To start vdr-sxfe, simply login into your X-session and when the desktop is shown, open a Terminal Session and type the following:

Code:

vdr-sxfe --video=xv --aspect=16:9 --fullscreen --width=1280 --height=720 --nokbd --post=tvtime:method=Linear,cheap_mode=1,pulldown=0,use_progressive_frame_flag=1

With the above option the vdr-sxfe binary will start. You can change the width and height to your liking (I have my system configured for 1280x720@60Hz). Ultimately you can use a frontend like oxine or Linux MMS to start vdr-sxfe. 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

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


页首
 用户资料  
 
3 楼 
 文章标题 : Re: HOW TO:VDR 1.7.0, HDTV and CCcam with budget cards on Ubuntu
帖子发表于 : 2009-06-07 7:18 

注册: 2005-10-23 23:06
帖子: 74
送出感谢: 0 次
接收感谢: 0 次
谢谢,正在折腾中....


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 3 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:Bing [Bot], ytlaowang 和 4 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译