https://wiki.archlinux.org/api.php?action=feedcontributions&user=Franzb&feedformat=atomArchWiki - User contributions [en]2024-03-29T06:46:27ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=VDR&diff=117416VDR2010-09-15T16:20:50Z<p>Franzb: Added Streaming to iPhone section</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
<br />
=Extending VDR=<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see [[Lirc]]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from ArchVDR and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Over the Local Area Network (LAN)===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Over the Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====StreamDev Plugin====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
===Streaming to iPhone, iPad and iPod===<br />
Wouldn't it be great to access your VDR on the go, e.g., on the train or just in a boring meeting ;-) Well, [http://projects.vdr-developer.org/projects/istreamdev/news iStreamDev] makes exactly that possible. iStreamDev is a relatively new project with the aim of watching live TV, playing VDR's recordings and even streaming arbitraty video and audio files from your PC at home to Apple's mobile devices, over Wifi as well as over UMTS. The setup is rather simple, just follow the [http://projects.vdr-developer.org/wiki/istreamdev/INSTALL guide]. To ensure you are motivated to get started, have a look at some [http://projects.vdr-developer.org/wiki/istreamdev/SCREENSHOTS screenshots]. Believe me, it is as awesome as it looks!<br />
<br />
When configuring Apache and PHP, make sure to add your VDR video directory to the open_basedir line in /etc/php/php_ini, e.g.<br />
<pre><br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/video/<br />
</pre><br />
<br />
As for now, to make it work on the iPad you have to use the git version.<br />
<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=117415VDR2010-09-15T16:16:41Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
<br />
=Extending VDR=<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see [[Lirc]]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from ArchVDR and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Over the Local Area Network (LAN)===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Over the Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====Plugin StreamDev====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
===Streaming to iPhone, iPad and iPod===<br />
Wouldn't it be great to access your VDR on the go, e.g., on the train or just in a boring meeting ;-) Well, [http://projects.vdr-developer.org/projects/istreamdev/news iStreamDev] makes exactly that possible. iStreamDev is a relatively new project with the aim of watching live TV, playing VDR's recordings and even streaming arbitraty video and audio files from your PC at home to Apple's mobile devices, over Wifi as well as over UMTS. The setup is rather simple, just follow the [http://projects.vdr-developer.org/wiki/istreamdev/INSTALL guide]. To ensure you are motivated to get started, have a look at some [http://projects.vdr-developer.org/wiki/istreamdev/SCREENSHOTS screenshots]. Believe me, it is as awesome as it looks!<br />
<br />
When configuring Apache and PHP, make sure to add your VDR video directory to the open_basedir line in /etc/php/php_ini, e.g.<br />
<pre><br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/video/<br />
</pre><br />
<br />
As for now, to make it work on the iPad you have to use the git version.<br />
<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=117414VDR2010-09-15T16:11:58Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
<br />
=Extending VDR=<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see [[Lirc]]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from ArchVDR and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Over the Local Area Network (LAN)===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Over the Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====Plugin StreamDev====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
===Streaming to iPhone, iPad and iPod===<br />
Wouldn't it be great to access your VDR on the go, e.g., on the train or just in a boring meeting ;-) Well, [http://projects.vdr-developer.org/projects/istreamdev/news iStreamDev] makes exactly that possible. iStreamDev is a relatively new project with the aim of watching live TV, playing VDR's recordings and even streaming arbitraty video and audio files from your PC at home to Apple's mobile devices, over Wifi as well as over UMTS. The setup is rather simple, just follow the [http://projects.vdr-developer.org/wiki/istreamdev/INSTALL guide]. When configuring Apache and PHP, make sure to add your VDR video directory to the open_basedir line in /etc/php/php_ini, e.g.<br />
<pre><br />
open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/video/<br />
</pre><br />
<br />
As for now, to make it work on the iPad you have to use the git version.<br />
<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=117309VDR2010-09-14T08:46:18Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from ArchVDR and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Extending VDR=<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====Plugin StreamDev====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=117308VDR2010-09-14T08:44:03Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Extending VDR=<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xineliboutput - Full-Featured and Budget Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: vdr-plugin-xineliboutput.<br />
<br />
On the remote computer the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR], have to be installed.<br />
<br />
Adjust the file ~/.xine/keymap as described [[ Xineliboutput - Full-Featured and Budget Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>:37890#nocache" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback. <br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
Two concepts will be provided, since using the same techniques, the quality of the resulting stream should be similar.<br />
<br />
====Plugin StreamDev====<br />
An easy approach and also the recommended one is to set up the plugin Streamdev from ArchVDR. <br />
<br />
=====Server=====<br />
The plugin's config file (/etc/vdr/plugins/plugin.streamdev-server.conf) has to have a reference to the file externremux.sh.<br />
<br />
<pre><br />
-r /usr/bin/externremux.sh<br />
</pre><br />
<br />
That is the content of the file /usr/bin/externremux.sh, adjust it to your liking:<br />
<pre><br />
# externremux.sh<br />
<br />
# CONFIG START<br />
TMP=/tmp/externremux-${RANDOM:-$$}<br />
STREAMQUALITY="150"<br />
# CONFIG END<br />
<br />
mkdir -p $TMP<br />
mkfifo $TMP/out.avi<br />
(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &<br />
<br />
case ${1:-$STREAMQUALITY} in<br />
"100") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=100:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"150") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"200") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=32:q=2:mode=3 -vf pp=ci,scale -zoom -xy 360 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"250") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 400 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"300") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=300:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"350") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=350:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=48:q=2:mode=3 -vf pp=ci,scale -zoom -xy 440 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"400") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"450") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=450:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=64:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"500") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=500:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"750") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=750:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
"1000") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=1000:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=128:q=2:mode=3 -vf pp=ci -o $TMP/out.avi -- - &>$TMP/out.log ;;<br />
<br />
*) touch $TMP/out.avi ;;<br />
esac<br />
</pre><br />
<br />
<br />
=====Client=====<br />
On the client side only VLC has to be installed, you can start the streaming process with<br />
<pre><br />
vlc "http://<VDR's public IP>:3000/extern;250/19"<br />
</pre><br />
<br />
In this example, channel 19 is being streamed with the "250" option resulting in 250 Kbit Video and 48 Kbit Audio streaming. Make sure to forward port 3000 to the computer running VDR.<br />
<br />
<br />
====VLC====<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
=====Server=====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
======Full-Featured Cards Only======<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
======Full-Featured and Budget Cards======<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
=====Client=====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<VDR's public IP>:1234<br />
</pre><br />
<br />
Make sure to forward port 1234 to the computer running VDR.<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=115244VDR2010-08-25T12:52:38Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn any PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, view your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, and the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team] provide PKGBUILDs for VDR and its most commonly used plugins and addons.<br />
<br />
This article is divided into three parts. In the first part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xineliboutput. At present, HDTV - mainly via DVB-S2 - is becoming more and more popular and the good news is that VDR supports a wide range of such cards, e.g. [http://www.vdr-wiki.de/wiki/index.php/DVB-S2_Budget-PCI-Karten internal PCI cards]. A widely used HDTV card is Hauppauge's Nova-HD-S2, which comes with a remote control that can be used in VDR, more about that later. Ok then, lets get into more detail.<br />
<br />
==Installation==<br />
<br />
Even though you can install VDR from the [http://aur.archlinux.org/ AUR], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing], it is recommendable to use the up-do-date [http://wiki.archlinux.org/index.php/PKGBUILD PKGBUILDs] for VDR, its plugins and addons provided by the [http://sourceforge.net/apps/trac/archvdr/ ArchVDR team]. The [http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR Wiki] explains further details on how to get the files.<br />
<br />
The VDR package's install script will create a special user called ''vdr'', especially for running VDR. The vdr user will be added to the video group so that it can access DVB cards and should own VDR's configuration files in /etc/vdr and the recordings and Electronic Programme Guide (EPG) directories /var/spool/video and /var/spool/epg.<br />
<br />
== DVB Card Kernel Modules and Firmware ==<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
Also other cards, like the already mentioned DVB-S2 card Nova-HD-S2 from Hauppauge require a firmware to be put into /lib/firmware, in the case of the Nova-HD-S2 the firmware's name is dvb-fe-cx24116.fw. Do not forget to eiter reload the card's module or to restart the computer.<br />
<br />
<br />
==Starting VDR==<br />
VDR is normally started as a service (/etc/rc.d/vdr), so you can simply add it to /etc/rc.conf:<br />
<pre><br />
DEAMONs=(... @vdr)<br />
</pre><br />
<br />
If you want to change the user running VDR, the destination of the video directory or the configuration files, you can do so by editing the VDR's configuration file (/etc/default/vdr):<br />
<br />
<pre><br />
OPTIONS="-u franz -c /video -v /video -E /video/epg.data -w 60"<br />
</pre><br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, the functionality of VDR can be extended with [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins]. The following set of plugins, all available from ArchVDR, will make a usable basic VDR installation<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin vdr-epgsearch], a replacement schedule with extended functionality. The epgearch plugin is being used by the plugin vdr-live.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Extrecmenu-plugin vdr-extrecmenu], a replacement recordings menu with extended functionality.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin vdr-femon], a frontend status monitor.<br />
* [http://streamdev.vdr-developer.org/ vdr-streamdev], a streaming server/client. Easy to set up with vdradmin-am.<br />
* [http://live.vdr-developer.org/en/index.php vdr-live], a web interface that can be used to control VDR, view and search the EPG, schedule recordings and stream live TV.<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin vdr-xineliboutput], which provides a frontend for VDR and can be used with cards without a hardware MPEG decoder.<br />
<br />
VDR does not support MHEG-5 teletext ("The Red Button" in the UK), so the [http://aur.archlinux.org/packages.php?ID=36420 vdr-rssreader] plugin can make a useful alternative.<br />
<br />
===How to Setup a Plugin===<br />
The command line syntax for running a plugin with VDR is<br />
<pre><br />
vdr -P"name [OPTIONS]"<br />
</pre><br />
and the quickest way to find out what options each installed plugin has is to run<br />
<pre><br />
$ vdr --help<br />
</pre><br />
<br />
<br />
Once installed, the plugins are loaded automatically when VDR is being started. If you want to alter the configuration of a plugin, you can do so editing the according config file in /etc/vdr/plugins/.<br />
<br />
<br />
<br />
==Remote Control==<br />
You might want to control VDR not only by keyboard but using a remote control while relaxing on the couch. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to the VDR command line<br />
<pre><br />
$ vdr ... --lirc<br />
</pre><br />
or enable LIRC in /etc/runvdr.conf if you are using runvdr-extreme<br />
<pre><br />
# Use a LIRC remote control device. If set to 1, vdr uses /var/run/lirc/lircd.<br />
# If not set, or set to 0, don't use LIRC.<br />
LIRC=1<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards or on the Hauppauge Nova-HD-S2. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
==Configuring VDR==<br />
<br />
===Channel Scan===<br />
Make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there.<br />
<br />
If you own a DVB-T or DVB-C card then either the scan utility from [http://www.archlinux.org/packages/?q=linuxtv-dvb-apps linuxtv-dvb-apps] or [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan], which is available from the [http://aur.archlinux.org/ AUR], will be your friend. (You might have to use translate.google.com for translating w_scan's German wiki into English.) If you live in the UK then scan has the advantage over w_scan because it can output channels in Logical Channel Number order for VDR, i.e. channel 1 will be BBC ONE, 2 will be BBC TWO etc.<br />
<pre><br />
$ scan -o vdr -e 3 -p -x 0 -t 3 -u -U -q -q <path_to_initial_tuning_data_file> > channels.conf<br />
</pre><br />
<pre><br />
$ cat /etc/vdr/channels.conf<br />
:@1 <br />
BBC ONE;BBC:505833:C34D34M16B8T2G32Y0:T:27500:600:601=eng,602=eng:0:0:4164:9018:4100:0<br />
:@2 <br />
BBC TWO;BBC:505833:C34D34M16B8T2G32Y0:T:27500:610:611=eng,612=eng:0:0:4228:9018:4100:0<br />
:@3 <br />
ITV1;ITV:481833:C23D12M64B8T2G32Y0:T:27500:520:521=eng,522=eng:0:0:8261:9018:8197:0<br />
:@4 <br />
Channel 4;Channel 4 TV:481833:C23D12M64B8T2G32Y0:T:27500:560:561=eng,562=eng:0:0:8384:9018:8197:0<br />
:@5 <br />
FIVE;five:481833:C23D12M64B8T2G32Y0:T:27500:540:541=eng,542=eng:0:0:8500:9018:8197:0<br />
</pre><br />
<br />
===Controlling and Displaying VDR===<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on an X-server. BTW, to make us of the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/runvdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xineliboutput - Full-Featured and Budget Cards====<br />
The plugin vdr-xineliboutput enables VDR to be used with cards without a hardware MPEG decoder chip such as the often mentioned Hauppauge Nova-HD-S2. <br />
<br />
=====Configuring vdr-xineliboutput=====<br />
There are some xine configuration changes that can improve performance with VDR. Make sure that xine is not running then edit the following in ${HOME}/.xine/config<br />
<pre><br />
# number of audio buffers<br />
# numeric, default: 230<br />
engine.buffers.audio_num_buffers:500<br />
<br />
# number of video buffers<br />
# numeric, default: 500<br />
engine.buffers.video_num_buffers:1000<br />
<br />
# default number of video frames<br />
# numeric, default: 15<br />
engine.buffers.video_num_frames:22<br />
<br />
# method to sync audio and video<br />
# { metronom feedback resample }, default: 0<br />
audio.synchronization.av_sync_method:resample<br />
<br />
# enable resampling<br />
# { auto off on }, default: 0<br />
audio.synchronization.resample_mode:on<br />
</pre><br />
<br />
Using xine-ui-vdr you can also use your keyboard to control VDR. Start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
$ xine "xvdr+tcp://<VDR's IP address>:37890#nocache" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
It might be necessary to adjust the plugin's configuration (/etc/vdr/plugins/plugin.xinliboutput.conf)<br />
<pre><br />
--local=none<br />
--primary <br />
--remote=<VDR's IP address>:37890 <br />
</pre><br />
<br />
<br />
=Extending VDR=<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
<br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<pre><br />
-P"xine -r -p"<br />
</pre> <br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "xvdr+tcp://<VDR's IP address>#nocache" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[http://live.vdr-developer.org/en/index.php | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.tvdr.de/index.htm VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Partclone&diff=68537Partclone2009-05-10T21:41:33Z<p>Franzb: </p>
<hr />
<div>==Introduction==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone], like the well known [http://www.partimage.org/Main_Page Partimage], can be used to back up and restore a partition while considering only used blocks. In Arch Linux Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.<br />
<br />
==Installation==<br />
<br />
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone or partclone-svn).<br />
<br />
==How to use Partclone with an ext4-formatted partition==<br />
<br />
===Without Compression===<br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
====restore====<br />
<pre><br />
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}}<br />
<br />
===With Compression=== <br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
(for maximum compression use "gzip -c9")<br />
<br />
====restore====<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}} <br />
<br />
[[Category:Software (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Partclone&diff=68248Partclone2009-05-05T20:32:34Z<p>Franzb: /* Introduction */</p>
<hr />
<div>==Introduction==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone], like the well known [http://www.partimage.org/Main_Page Partimage], can be used to back up and restore a partition while considering only used blocks. In Arch Linux Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.<br />
<br />
==Installation==<br />
<br />
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).<br />
<br />
==How to use Partclone with an ext4-formatted partition==<br />
<br />
===Without Compression===<br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
====restore====<br />
<pre><br />
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}}<br />
<br />
===With Compression=== <br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
(for maximum compression use "gzip -c9")<br />
<br />
====restore====<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}} <br />
<br />
[[Category:Software (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Partclone&diff=68247Partclone2009-05-05T20:32:14Z<p>Franzb: </p>
<hr />
<div>==Introduction==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone], like the well known [http://www.partimage.org/Main_Page Partimage], can be used to back up and restore a partition while considering only used blocks. In Arch Linux, Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.<br />
<br />
==Installation==<br />
<br />
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).<br />
<br />
==How to use Partclone with an ext4-formatted partition==<br />
<br />
===Without Compression===<br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
====restore====<br />
<pre><br />
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}}<br />
<br />
===With Compression=== <br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
(for maximum compression use "gzip -c9")<br />
<br />
====restore====<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}} <br />
<br />
[[Category:Software (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Partclone&diff=68246Partclone2009-05-05T20:06:50Z<p>Franzb: </p>
<hr />
<div>==Introduction==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone], like the well known [http://www.partimage.org/Main_Page Partimage], can be used to back up and restore a partition while considering only used blocks. Partclone can deal with the following file systems: ext2, ext3, ext4, reiserfs, hfs+, fat and ntfs.<br />
<br />
==Installation==<br />
<br />
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).<br />
<br />
==How to use Partclone with an ext4-formatted partition==<br />
<br />
===Without Compression===<br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
====restore====<br />
<pre><br />
partclone.ext4 -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}}<br />
<br />
===With Compression=== <br />
<br />
====back up====<br />
<pre><br />
partclone.ext4 -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
(for maximum compression use "gzip -c9")<br />
<br />
====restore====<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.ext4 -r -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}} <br />
<br />
[[Category:Software (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Partclone&diff=68242Partclone2009-05-05T19:47:08Z<p>Franzb: </p>
<hr />
<div>==Introduction==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore, <br />
Partclone produces smaller image files then [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] does. <br />
<br />
Partclone is available on the [http://aur.archlinux.org/ AUR] (partclone-svn).<br />
<br />
==Usage==<br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}}<br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 | gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
{{Note|Adjust source and target to your needs.}} <br />
<br />
[[Category:Software (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=64230VDR2009-03-06T17:29:59Z<p>Franzb: /* Conclusion */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone compatible video<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=64228VDR2009-03-06T17:27:56Z<p>Franzb: /* Full-Featured and Budget Cards */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone compatible video<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}"<br />
</pre><br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=64227VDR2009-03-06T17:26:47Z<p>Franzb: /* Internet */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone compatible video<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically, the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:37899}}"<br />
</pre><br />
<br />
<br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=64226VDR2009-03-06T17:24:03Z<p>Franzb: /* Plugins */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone compatible video<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:37899}}"<br />
</pre><br />
<br />
<br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=62616VDR2009-02-19T12:16:03Z<p>Franzb: /* Internet */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:37899}}"<br />
</pre><br />
<br />
<br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=62559VDR2009-02-18T18:48:46Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
====Set Up Server====<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) in the following commands according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
=====Full-Featured Cards Only=====<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
<br />
<br />
=====Full-Featured and Budget Cards=====<br />
You need to install the plugin vdr-xineliboutput, available on [http://aur.archlinux.org/ AUR]. You start the video streaming with the following command:<br />
<pre><br />
cvlc http://localhost:37890 :http-caching=3000 :sout="#transcode{vcodec=h264,vb=200,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:37899}}"<br />
</pre><br />
<br />
<br />
<br />
====Set Up Client====<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=62548VDR2009-02-18T16:55:36Z<p>Franzb: /* Internet */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. VLC has to be installed on the server as well as on the client.<br />
<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=62546VDR2009-02-18T16:54:44Z<p>Franzb: /* Internet */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. Vlc has to be installed on the server as well as on the client.<br />
<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp4a,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61677Ext42009-02-12T17:05:37Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Note|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have. A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] steps into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] does. <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 |gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR] (partclone-svn). Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61672Ext42009-02-12T15:48:00Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] steps into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] does. <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR] (partclone-svn). Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61671Ext42009-02-12T15:45:02Z<p>Franzb: /* With Compression */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] and [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] step into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then dd does (see below). <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR] (partclone-svn). Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
==dd==<br />
[http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] is a tool for low level copying of data and therefore works with all file systems including ext4.<br />
===Without Compression===<br />
back up<br />
<pre><br />
dd if=/dev/sda1 of=~/image_sda1.img<br />
</pre><br />
<br />
restore<br />
<pre><br />
dd if=~/image_sda1.img of=/dev/sda1<br />
</pre><br />
<br />
<br />
===With Compression===<br />
Since dd copies all blocks, including unused ones, the created image is just as large as the source partition. Therefore, it makes sense to use dd in combination with compression:<br />
<br />
backup<br />
<pre><br />
dd if=/dev/sda1 | gzip -9 > ~/image_compressed_sda1.img.gz <br />
</pre><br />
<br />
restore<br />
<pre><br />
gunzip -c ~/image_compressed_sda1.img.gz | dd of=/dev/sda1<br />
</pre><br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61670Ext42009-02-12T15:44:47Z<p>Franzb: /* With Compression */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] and [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] step into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then dd does (see below). <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR] (package partclone-svn). Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
==dd==<br />
[http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] is a tool for low level copying of data and therefore works with all file systems including ext4.<br />
===Without Compression===<br />
back up<br />
<pre><br />
dd if=/dev/sda1 of=~/image_sda1.img<br />
</pre><br />
<br />
restore<br />
<pre><br />
dd if=~/image_sda1.img of=/dev/sda1<br />
</pre><br />
<br />
<br />
===With Compression===<br />
Since dd copies all blocks, including unused ones, the created image is just as large as the source partition. Therefore, it makes sense to use dd in combination with compression:<br />
<br />
backup<br />
<pre><br />
dd if=/dev/sda1 | gzip -9 > ~/image_compressed_sda1.img.gz <br />
</pre><br />
<br />
restore<br />
<pre><br />
gunzip -c ~/image_compressed_sda1.img.gz | dd of=/dev/sda1<br />
</pre><br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61669Ext42009-02-12T15:43:43Z<p>Franzb: /* With Compression */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] and [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] step into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then dd does (see below). <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl.gz<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR]. Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
==dd==<br />
[http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] is a tool for low level copying of data and therefore works with all file systems including ext4.<br />
===Without Compression===<br />
back up<br />
<pre><br />
dd if=/dev/sda1 of=~/image_sda1.img<br />
</pre><br />
<br />
restore<br />
<pre><br />
dd if=~/image_sda1.img of=/dev/sda1<br />
</pre><br />
<br />
<br />
===With Compression===<br />
Since dd copies all blocks, including unused ones, the created image is just as large as the source partition. Therefore, it makes sense to use dd in combination with compression:<br />
<br />
backup<br />
<pre><br />
dd if=/dev/sda1 | gzip -9 > ~/image_compressed_sda1.img.gz <br />
</pre><br />
<br />
restore<br />
<pre><br />
gunzip -c ~/image_compressed_sda1.img.gz | dd of=/dev/sda1<br />
</pre><br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61668Ext42009-02-12T15:43:13Z<p>Franzb: /* With Compression */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] and [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] step into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then dd does (see below). <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl.gz<br />
zcat sda6.partclone.gz |partclone.extfs -r -o /dev/sda6<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR]. Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
==dd==<br />
[http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] is a tool for low level copying of data and therefore works with all file systems including ext4.<br />
===Without Compression===<br />
back up<br />
<pre><br />
dd if=/dev/sda1 of=~/image_sda1.img<br />
</pre><br />
<br />
restore<br />
<pre><br />
dd if=~/image_sda1.img of=/dev/sda1<br />
</pre><br />
<br />
<br />
===With Compression===<br />
Since dd copies all blocks, including unused ones, the created image is just as large as the source partition. Therefore, it makes sense to use dd in combination with compression:<br />
<br />
backup<br />
<pre><br />
dd if=/dev/sda1 | gzip -9 > ~/image_compressed_sda1.img.gz <br />
</pre><br />
<br />
restore<br />
<pre><br />
gunzip -c ~/image_compressed_sda1.img.gz | dd of=/dev/sda1<br />
</pre><br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=Ext4&diff=61667Ext42009-02-12T15:42:24Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|Ext4}}<br />
{{i18n_entry|Türkçe|Ext4 (Türkçe)}}<br />
{{i18n_links_end}}<br />
<br />
=Introduction=<br />
<br />
Ext4 is the evolution of the most used Linux filesystem, Ext3. In many ways, Ext4 is a deeper improvement over Ext3 than Ext3 was over Ext2. Ext3 was mostly about adding journaling to Ext2, but Ext4 modifies important data structures of the filesystem such as the ones destined to store the file data. The result is a filesystem with an improved design, better performance, reliability, and features.<br />
<br />
Source: [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies]<br />
<br />
=Creating ext4 Partitions From Scratch=<br />
<br />
# Upgrade your system: {{Codeline|pacman -Syu}}<br />
# Format the drive: {{Codeline|mkfs.ext4 /dev/sdxY}} (see the mkfs.ext4 man page for options)<br />
# Mount the drive<br />
# Add an entry to {{Filename|/etc/fstab}}, using the filesystem 'type' ext4<br />
<br />
=Migrating From ext3 to ext4=<br />
<br />
There are two ways of migrating partitions from ext3 to ext4:<br />
* mounting ext3 partitions as ext4 without converting (compatibility)<br />
* converting ext3 partitions to ext4 (performance)<br />
<br />
These two approaches are described below.<br />
<br />
==Mounting ext3 Partitions as ext4 Without Converting==<br />
<br />
===Rationale===<br />
<br />
A compromise between fully converting to ext4 and simply remaining with ext3 is to mount existing ext3 partitions as ext4.<br />
<br />
'''Pros:'''<br />
* Compatibility (the filesystem can continue to be mounted as ext3) &ndash; This allows users to still read the filesystem from other distributions/operating systems without ext4 support (e.g. Windows with ext3 drivers)<br />
* Improved performance (though not as much as a fully-converted ext4 partition) &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Fewer features of ext4 are used (only those that do not change the disk format such as multiblock allocation and delayed allocation)<br />
<br />
{{Tip|Except for the relative novelty of ext4 (which can be seen as a risk), '''there is no major drawback to this technique'''.}}<br />
<br />
===Procedure===<br />
<br />
# Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions you would like to mount as ext4.<br />
# Re-mount the affected partitions.<br />
# That's all, folks!<br />
<br />
==Converting ext3 Partitions to ext4==<br />
<br />
===Rationale===<br />
<br />
To fully experience the joys of ext4, an irreversible conversion process must be completed.<br />
<br />
'''Pros:'''<br />
* Improved performance and awesome new features &ndash; See [http://kernelnewbies.org/Ext4 Ext4 - Linux Kernel Newbies] for details<br />
<br />
'''Cons:'''<br />
* Cannot be read/written with ext3 drivers (note that there is no known ext4 driver for Windows)<br />
* Irreversible (ext4 partitions cannot be 'downgraded' to ext3)<br />
<br />
===Prerequisites===<br />
<br />
The following software is required on the Arch Linux system:<br />
* {{Codeline|1=kernel26 >= 2.6.28}}<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
If converting one's /boot partition to ext4:<br />
* {{Codeline|1=grub >= 0.97}} (with ext4 patch)<br />
<br />
{{Note|The ext4 patch is included by default with Arch's GRUB package (at the time of writing, but this will likely not change). Otherwise, [[GRUB2]] is required for booting from an ext4 partition.}}<br />
<br />
{{Warning|Booting from an ext4 partition is not 'officially' supported by GRUB, and [[GRUB2]] is still under development. While GRUB does currently work, the 'safe' option is to boot from an ext2 or ext3 /boot partition. '''CONSIDER YOURSELF WARNED!}}<br />
<br />
If converting one's root (/) partition to ext4:<br />
* {{Codeline|1=mkinitcpio >= 0.5.20}}<br />
<br />
If converting one's root (/) partition to ext4, the following software is also needed on a bootable CD/USB drive:<br />
* {{Codeline|1=e2fsprogs >= 1.41}}<br />
<br />
{{Note|1=The latest Arch Linux images (2008.06) ship with an older version of {{Codeline|e2fsprogs}}, but it is a simple matter to {{Codeline|pacman -Sy e2fsprogs}} from the live environment after setting up networking. Alternatively, [http://www.sysresccd.org/Download SystemRescueCd 1.1.4] contains an appropriate version, and is in itself a handy CD to have.}}<br />
<br />
{{Note|1=A new Arch Linux image is expected to be released shortly, and will contain a current version of {{Codeline|e2fsprogs}}.}}<br />
<br />
===Procedure===<br />
<br />
These instructions were adapted from http://ext4.wiki.kernel.org/index.php/Ext4_Howto and http://bbs.archlinux.org/viewtopic.php?id=61602. They have been tested and confirmed by this author as of January 16, 2009.<br />
<br />
* '''UPGRADE!''' Perform a sysupgrade to ensure all required packages are up-to-date: {{Codeline|pacman -Syu}}<br />
* '''BACK-UP!''' Back-up all data on any ext3 partitions that are to be converted to ext4. Although ext4 is considered 'stable' for general use, it is still a relatively young and untested file system. Furthermore, this conversion process was only tested on a relatively simple setup; it is impossible to test each of the many possible configurations the user may be running.<br />
* Edit {{Filename|/etc/fstab}} and change the 'type' from ext3 to ext4 for any partitions that are to be converted to ext4.<br />
<br />
{{Warning|ext4 is backwards-compatible with ext3 until extents and other new fancy options are enabled. If the user has a partition that is shared with another OS that cannot yet read ext4 partitions, it is possible to mount said partition as ext4 in Arch and still be able to use it as ext3 elsewhere at this point... Not so after the next step! Note, however, that there are fewer benefits to using ext4 if the partition is not fully converted.}}<br />
<br />
* The conversion process with {{Codeline|e2fsprogs}} must be done when the drive is not mounted. If converting one's root (/) partition, the simplest way to achieve this is to boot from some other live medium, as described in the 'Prerequisites' section above.<br />
** Boot the live medium (if necessary).<br />
** For each partition to be converted to ext4:<br />
*** Ensure the partition is '''NOT''' mounted<br />
*** Run {{Codeline|tune2fs -O extents,uninit_bg,dir_index /dev/the_partition}} (where {{Codeline|/dev/the_partition}} is replaced by the path to the desired partition, such as {{Codeline|/dev/sda1}})<br />
*** Run {{Codeline|fsck -fp /dev/the_partition}}<br />
<br />
{{Note|The user '''MUST''' fsck the filesystem, or it will be unreadable! This fsck run is needed to return the filesystem to a consistent state. '''It WILL find checksum errors in the group descriptors''' -- this is expected. The '-f' parameter asks fsck to force checking even if the file system seems clean. The '-p' parameter asks fsck to 'automatically repair' (otherwise, the user will be asked for input for each error).}}<br />
<br />
* Reboot Arch Linux!<br />
<br />
{{Warning|1=If the user converted their root (/) partition, a kernel panic may be encountered when attempting to boot. If this happens, simply reboot using the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}}}<br />
<br />
===Troubleshooting===<br />
<br />
====Kernel Panic====<br />
One problem this author encountered was a kernel panic after converting the root (/) partition to ext4. This is because the initial ramdisk was detecting the partition as 'ext4dev', rather than 'ext4'. It was a simple matter to boot with the 'fallback' initial ramdisk and re-create the 'default' initial ramdisk: {{Codeline|mkinitcpio -p kernel26}}<br />
<br />
During the creation process, {{Codeline|mkinitcpio}} correctly detected and included ext4 modules in the initial ramdisk.<br />
<br />
====GRUB Error 13====<br />
After a recent kernel update, this author encountered a GRUB error while attempting to boot from an ext4 /boot partition:<br />
Error 13: Invalid or unsupported executable format<br />
<br />
The solution is to boot from the live medium (SystemRescueCd 1.1.4), and chroot into the Arch Linux installation:<br />
# mkdir /mnt/arch<br />
# mount -t ext4 /dev/sda1 /mnt/arch<br />
# mount -t proc proc /mnt/arch/proc<br />
# mount -t sysfs sys /mnt/arch/sys<br />
# mount -o bind /dev /mnt/arch/dev<br />
<br />
# chroot /mnt/arch /bin/bash<br />
<br />
If /boot is on a separate partition, this partition must also be mounted:<br />
# mount -t ext4 /dev/sda2 /boot<br />
<br />
Then, the following command should resolve the issue. (Does anyone know why?):<br />
# grub-install --recheck /dev/sda<br />
<br />
=Back Up and Restore ext4 Partitions=<br />
Since ext4 is relatively new, established partition cloning tools like Partimage do not support ext4 (yet). Nevertheless, <br />
[http://partclone.nchc.org.tw/ Partclone] and [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] step into the breach.<br />
<br />
<br />
==Partclone==<br />
<br />
[http://partclone.nchc.org.tw/ Partclone] provides utilities to back up and restore only the used blocks of a partition. Therefore Partclone produces smaller image files then dd does (see below). <br />
<br />
===Without Compression===<br />
<br />
back up<br />
<pre><br />
partclone.extfs -c -s /dev/sda1 -o ~/image_sda1.pcl<br />
</pre><br />
<br />
restore<br />
<pre><br />
partclone.extfs -r -s ~/image_sda1.pcl -o /dev/sda1<br />
</pre><br />
<br />
===With Compression=== <br />
<br />
back up (for maximum compression use "gzip -c9")<br />
<pre><br />
partclone.extfs -c -s /dev/sda6 |gzip -c > ~/image_sda1.pcl<br />
zcat sda6.partclone.gz |partclone.extfs -r -o /dev/sda6<br />
</pre><br />
<br />
<br />
restore<br />
<pre><br />
zcat ~/image_sda1.pcl.gz | partclone.extfs -r -o /dev/sda1<br />
</pre><br />
<br />
Adjust source and target partition and file name to your needs. Partclone is available on [http://aur.archlinux.org/ AUR]. Due to compiling issues, Partclone currently can be installed on ARCH-i686 systems only, but can nevertheless back up and restore images from and to 64 bit systems, of course.<br />
<br />
<br />
==dd==<br />
[http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] is a tool for low level copying of data and therefore works with all file systems including ext4.<br />
===Without Compression===<br />
back up<br />
<pre><br />
dd if=/dev/sda1 of=~/image_sda1.img<br />
</pre><br />
<br />
restore<br />
<pre><br />
dd if=~/image_sda1.img of=/dev/sda1<br />
</pre><br />
<br />
<br />
===With Compression===<br />
Since dd copies all blocks, including unused ones, the created image is just as large as the source partition. Therefore, it makes sense to use dd in combination with compression:<br />
<br />
backup<br />
<pre><br />
dd if=/dev/sda1 | gzip -9 > ~/image_compressed_sda1.img.gz <br />
</pre><br />
<br />
restore<br />
<pre><br />
gunzip -c ~/image_compressed_sda1.img.gz | dd of=/dev/sda1<br />
</pre><br />
<br />
[[Category:HOWTOs (English)]] [[Category:File systems (English)]]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=60050VDR2009-02-04T17:00:59Z<p>Franzb: /* Plugin Not Available on AUR */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if a plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59929VDR2009-02-02T21:58:26Z<p>Franzb: /* Internet */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
Start the video streaming on the computer running VDR with the following command (for easy access you can include the command in /etc/vdr/commands.conf):<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59801VDR2009-02-01T21:49:08Z<p>Franzb: /* Plugins */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
* vdr-yacoto, makes it possible to convert VDR recordings in a variety of different formats, including Video-DVD and iPod/iPhone<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59800VDR2009-02-01T21:44:20Z<p>Franzb: /* Xine - Full-Featured and Budget Cards */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start Xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59799VDR2009-02-01T21:44:01Z<p>Franzb: /* Xine - Full-Featured and Budget Cards */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Start Xine with the following command:<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes" <br />
</pre><br />
<br />
By adding the option "-D" (deinterlace) the picture quality is increased.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59796VDR2009-02-01T21:23:42Z<p>Franzb: /* Xine - Full-Featured and Budget Cards */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being started automatically and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59795VDR2009-02-01T21:22:14Z<p>Franzb: /* TVtime - Full-Featured Cards Only */</p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start VDR (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59639VDR2009-01-30T19:06:22Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|German|VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59637VDR2009-01-30T19:05:00Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|:VDR}}<br />
{{i18n_entry|German|:VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59631VDR2009-01-30T18:51:09Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
{{Article summary start}}<br />
{{Article summary text|Explains setting up VDR}}<br />
{{Article summary heading|Available in languages}}<br />
{{i18n_entry|English|:VDR}}<br />
{{i18n_entry|Deutsch|:VDR (Deutsch)}}<br />
{{Article summary end}}<br />
<br />
<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59470VDR2009-01-28T09:07:29Z<p>Franzb: /* Internet */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card in order to encode and stream VDR over the Internet. You need to install the packages vlc and lame.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) according to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result looks startlingly great and you can watch live TV and recordings with hardly any cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59469VDR2009-01-28T09:04:36Z<p>Franzb: /* Internet */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming VDR over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream VDR over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result is surprisingly great and you can watch live TV and recordings with only little cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59468VDR2009-01-28T09:04:14Z<p>Franzb: /* Internet */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore, John Doe has to use highly optimized codecs like H.264 AVC and this is exactly what this part of the tutorial about streaming over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream VDR over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result is surprisingly great and you can watch live TV and recordings with only little cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59462VDR2009-01-28T08:46:40Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you are going to need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore John Doe has to use highly optimized codecs lice H.264 AVC and this is exactly what this part of the tutorial about streaming over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream VDR over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result is surprisingly great and you can watch live TV and recordings with only little cutback.<br />
<br />
You can control the remote VDR with either the [[VDR#Plugin Available on AUR | LIVE plugin]] or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59460VDR2009-01-28T08:43:41Z<p>Franzb: /* Internet */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
Theoretically the concept of streaming VDR over LAN or WLAN with the plugin vdr-xine can also be adopted to the Internet. The point is, though, that the requirements in terms of bandwith will only be fullfilled in very rare cases. To stream VDR without further compression you would need an upstream speed of three or even more Mbit/s, according to the bitrate of the broadcast. Therefore John Doe has to use highly optimized codecs lice H.264 AVC and this is exactly what this part of the tutorial about streaming over the Internet will be about.<br />
<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream VDR over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
Even though the quality of the video is visibly diminished, the result is surprisingly great and you can watch live TV and recordings with only little cutback.<br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59458VDR2009-01-28T08:19:04Z<p>Franzb: /* Local Area Network */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above ]] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59367VDR2009-01-27T10:20:41Z<p>Franzb: /* Show VDR Display */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Controlling and Displaying VDR===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+ cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV, on the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device.<br />
<br />
Therefore, this guide focuses on the VDR output on a X-server. BTW, to activate the VGA output of your full-featured card you simply have to connect your TV set using an adequate VGA cable.<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. For how to control VDR by remote control see [[VDR#Remote_Control | below]]. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59364VDR2009-01-27T10:04:40Z<p>Franzb: /* xmltv2vdr */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow [[XMLTV_HOWTO | this guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59301VDR2009-01-26T12:47:18Z<p>Franzb: /* Plugins */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [[XMLTV_HOWTO | guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59300VDR2009-01-26T12:45:32Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin, IMO a very good looking one<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [[XMLTV_HOWTO | guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59297VDR2009-01-26T12:36:27Z<p>Franzb: /* Show VDR Display */</p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. To control VDR, adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin, IMO a very good looking one<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [[XMLTV_HOWTO | guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59246VDR2009-01-25T17:46:48Z<p>Franzb: </p>
<hr />
<div>{{i18n_links_start}}<br />
{{i18n_entry|English|VDR}}<br />
{{i18n_entry|Deutsch|VDR (Deutsch)}}<br />
{{i18n_links_end}}<br />
<br />
[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. Adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Now you can start xine with the command<br />
<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes"<br />
</pre><br />
<br />
By adding the option -D (deinterlace) the picture will look smoother.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin, IMO a very good looking one<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [[XMLTV_HOWTO | guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59220VDR2009-01-25T14:26:47Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. Adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Now you can start xine with the command<br />
<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes"<br />
</pre><br />
<br />
By adding the option -D (deinterlace) the picture will look smoother.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin, IMO a very good looking one<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [[XMLTV_HOWTO | guide]] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzbhttps://wiki.archlinux.org/index.php?title=VDR&diff=59219VDR2009-01-25T14:25:35Z<p>Franzb: </p>
<hr />
<div>[[Category:Audio/Video (English)]]<br />
[[Category:HOWTOs (English)]]<br />
=Introduction=<br />
<br />
[http://www.cadsoft.de/vdr/ VDR] stands for <b>V</b>ideo <b>D</b>isk <b>R</b>ecorder, an open source software application to turn a PC into a digital video recorder. These initials do not fully explain what VDR is capable of. VDR does also implement all the functions of a modern set-top box to watch either live television or recordings. With the extensive amount of available [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] almost countless features can be added, e.g., play DVDs, play audio and video files, have a look at your photo collection, check your email account...<br />
<br />
With its flexibility Arch Linux is perfectly suited for setting VDR up and customizing it. [http://aur.archlinux.org/ AUR], the Arch Linux User-Community Repository, provides PKGBUILDs for VDR and some of its most commonly used plugins and addons.<br />
<br />
This article is devided into three parts. In the fist part I am going to show you how to install VDR on your PC and how to get it up and running. The second part of the article is about how to extend VDR by adding new features like playing DVDs or controlling VDR over the Internet. The third part is about rather advanced features like how to automatically detect and mark commercial breaks in your recordings or how to stream VDR over the Internet.<br />
<br />
=Initial Steps=<br />
<br />
This part of the guide is about how to install VDR and how to get it up and running.<br />
<br />
<br />
==Hardware Requirements==<br />
VDR is designed to work with a huge variety of DVB cards. See the [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR wiki] for whether or not your specific card will be supported. Let me just tell you that so called budget cards, i.e., cards without a hardware MPEG decoder, work perfectly fine with VDR thanks to plugins like vdr-xine.<br />
<br />
==Installation==<br />
Well, thanks to [http://aur.archlinux.org/ AUR ], [http://wiki.archlinux.org/index.php/AUR_User_Guidelines installing] VDR is really simple, just type<br />
<br />
<pre><br />
yaourt -S vdr<br />
</pre><br />
<br />
If you own one of the famous [http://www.vdr-wiki.de/wiki/index.php/DVB-S_full-featured-Karten full-featured DVB-S cards] (with hardware MPEG decoder) from Technotrend (identical in construction to Hauppauge Nexus, Technisat Skystar 1 and Fujitsu-Siemens DVB-S), you might have to do a little extra work since, at least on my computer, a wrong module gets control of the card. On my computer the command "lspci -k" shows the following output:<br />
<br />
<pre><br />
03:02.0 Multimedia controller: Philips Semiconductors SAA7146 (rev 01)<br />
Subsystem: Technotrend Systemtechnik GmbH Technotrend/Hauppauge DVB card rev2.3<br />
Kernel driver in use: dvb<br />
Kernel modules: dvb-ttpci, snd-aw2<br />
</pre><br />
<br />
As you can see, two modules, dvb-ttpci and snd-aw2, are assigned to the DVB card while only the former should take control. Simply add the unwanted one to the list in /etc/rc.conf:<br />
<br />
<pre><br />
MODULES=(... !snd-aw2 ...)<br />
</pre><br />
<br />
Also other cards seem to be affected by this specific problem. The solution, however, is always the same: blacklist the module snd-aw2.<br />
<br />
A restart of the computer should do the rest. Another two things you might do before the restart: if you own one of those full-featured cards (perhaps also for some other cards), you will also need a [http://www.linuxtv.org/downloads/firmware/ firmware] for the card to work. For the full-featured Technotrend cards the firmware is dvb-ttpci-01.fw and has to be placed into the folder /lib/firmware. Instead of restarting the computer you just can unload and load the kernel module dvb_ttpci. The second thing which requires at least a new login to take effect is to add yourself to the group "video" (gpasswd -a <username> video).<br />
<br />
==Configuring VDR==<br />
<br />
Now you will have to customize VDR's configuration files to your needs. First of all you should edit the file /etc/rc.vdr and make VDR run with standard user rights:<br />
<pre><br />
VDROPTS="-u <your username>"<br />
</pre><br />
<br />
Do also make sure VDR is allowed to write to /video<br />
<pre><br />
chown <your username> /video -R<br />
</pre><br />
<br />
<br />
===Channel Scan===<br />
<br />
Then make sure that the file channels.conf in /etc/vdr concurs with the satellite your dish is pointing at. [http://www.linowsat.de/settings/vdr.html Linowsat] provides up-to-date channel lists for all satellites out there. If you own a DVB-T or DVB-C card, [http://www.vdr-wiki.de/wiki/index.php/W_scan w_scan] will be your friend (you might have to use translate.google.com for translating the German wiki into English). The package w_scan is available on [http://aur.archlinux.org/ AUR].<br />
<br />
===Show VDR Display===<br />
<br />
Eventually, we want to make sure that we can submit controls to and can see the output (live tv and menu) of VDR. <br />
<br />
Full-featured cards have got a VGA connector on the card in order to connect an external TV set, alternatively this role can be taken over by DXR 3/Hollywood+-cards. Nevertheless, these possibilities are getting less important nowadays. On one hand with the advent of computer screens with 24 or even more inches the computer screen itself has become very attractive for watching TV. On the other hand, new TV sets do also have an implemented DVI, HDMI, or even DisplayPort input allowing the computer's graphics board to become the output device. Therefore, this guide focuses on the VDR output on a X-server (BTW, to make the VGA output of your full-featured card work you simply have to connect your TV set using an adequate VGA cable).<br />
<br />
For testing purposes it makes sense to control VDR with the keyboard. If you have a full-featured card there are two ways of dispaying the VDR screen and to control VDR by keyboard, if you own a budget card, one possibility will be given.<br />
<br />
<br />
====TVtime - Full-Featured Cards Only====<br />
[http://tvtime.sourceforge.net/ TVtime] is a TV application which can be used to display VDR's screen. Install the packages tvtime and the wrapper script [http://vdrportal.de/board/thread.php?threadid=18234 vdr-tvtime] from [http://aur.archlinux.org/ AUR]. Adjust the first column of the file /etc/tvtime/maps.txt according to your liking. Here is an example:<br />
<br />
<pre><br />
m Menu<br />
Enter Ok<br />
Backspace Back<br />
F1 Red<br />
F2 Green<br />
F3 Yellow<br />
F4 Blue<br />
+ Channel+<br />
- Channel-<br />
u Volume+<br />
d Volume-<br />
c Channels<br />
t Timers<br />
r Recordings<br />
s Setup<br />
a Audio<br />
n Info<br />
f TVTIME_f<br />
</pre><br />
<br />
Now you can start vdr (/etc/rc.d/vdr start). Then execute the script "vdr-tvtime.pl". TVtime should display the VDR screen and you should also be able to control VDR with the keyboard.<br />
<br />
====Xine - Full-Featured and Budget Cards====<br />
The three plugins vdr-xine, vdr-xineliboutput, and vdr-softdevice, all of which are available on [http://aur.archlinux.org/ AUR], enable you to use VDR with budget cards. IMO, the one best suited for both budget as well as full-featured cards is vdr-xine, because it has the ability to automatically claim the primary device when xine (of any frontend of xine-lib, e.g., [http://oxine.sourceforge.net/ Oxine]) connects.<br />
<br />
Install the VDR plugin vdr-xine, xine-lib-vdr and xine-ui-vdr from AUR. Edit the VDRPLUGINS entry in /etc/rc.vdr in order that the plugin is being automatically started and restart VDR (/etc/rc.d/vdr restart). The "-r" option allows the pressing of keys in xine to control VDR (see ~/.xine/keymap below).<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \<br />
"<br />
</pre> <br />
<br />
For testing it can also be helpful to start VDR on the command line<br />
<pre><br />
vdr -u <your username> -v /video -c /etc/vdr -P'xine -r'<br />
</pre><br />
<br />
<br />
Now start xine once and close it so that the file ~/.xine/keymap is going to be created. Edit this file so that at least the basic keys for controlling VDR will work, e.g.,<br />
<pre><br />
# jump to media Menu<br />
Menu {<br />
key = m<br />
modifier = none<br />
}<br />
<br />
# menu navigate up<br />
EventUp {<br />
key = Up<br />
modifier = none<br />
}<br />
<br />
# menu navigate down<br />
EventDown {<br />
key = Down<br />
modifier = none<br />
}<br />
<br />
# menu navigate left<br />
EventLeft {<br />
key = Left<br />
modifier = none<br />
}<br />
<br />
# menu navigate right<br />
EventRight {<br />
key = Right<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
EventSelect {<br />
key = Return<br />
modifier = none<br />
}<br />
<br />
# VDR Red button<br />
VDRButtonRed {<br />
key = F1<br />
modifier = none<br />
}<br />
<br />
# VDR Green button<br />
VDRButtonGreen {<br />
key = F2<br />
modifier = none<br />
}<br />
<br />
# VDR Yellow button<br />
VDRButtonYellow {<br />
key = F3<br />
modifier = none<br />
}<br />
<br />
# VDR Blue button<br />
VDRButtonBlue {<br />
key = F4<br />
modifier = none<br />
}<br />
<br />
# VDR Command back<br />
VDRBack {<br />
key = BackSpace<br />
modifier = none<br />
}<br />
<br />
# menu select<br />
Alias {<br />
entry = EventSelect<br />
key = KP_Enter<br />
modifier = none<br />
}<br />
</pre><br />
Also remember that you will get an error if you assign a key twice, make sure therefore to change for instance the key for "SpeedFaster" from "Up" to "VOID". It is possible, however, to assign two keys to the same event, you do so with the "Alias" keyword. More information on the [http://xinehq.de/index.php/readme Xine website].<br />
<br />
Now you can start xine with the command<br />
<br />
<pre><br />
xine "vdr:/tmp/vdr-xine/stream#demux:mpeg_pes"<br />
</pre><br />
<br />
By adding the option -D (deinterlace) the picture will look smoother.<br />
<br />
=Extending VDR=<br />
<br />
<br />
==Plugins==<br />
As already mentioned in the introduction, [http://www.linuxtv.org/vdrwiki/index.php/Plugins plugins] are a possibility to add new features to VDR. Some of the most commonly used plugins are available on AUR, I am going to present you some of them:<br />
<br />
* vdr-avards, for Automatic Video Aspect Ratio Detection and Signaling<br />
* vdr-burn, for creating Video-DVDs from recordings<br />
* vdr-dvd, for turing VDR into a DVD player<br />
* vdr-dvdswitch, for playing DVD images from the hard disk<br />
* vdr-live, for controlling VDR through a web interface<br />
* vdr-mplayer, a mplayer/mp3 plugin for VDR<br />
* vdr-osdteletext, displays teletext directly on the OSD in VDR<br />
* vdr-skinenigmang, provides an alternative skin, IMO a very good looking one<br />
<br />
<br />
===How to Setup a Plugin===<br />
<br />
<br />
====Plugin Available on AUR====<br />
I am going to show you how to install a plugin. I have chosen [http://live.vdr-developer.org/en/index.php LIVE] as an example. With LIVE you can control VDR over the LAN or even over the Internet. LIVE depends on two additional plugins, [http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin epgsearch] and [http://www.vdr-wiki.de/wiki/index.php/Streamdev-plugin streamdev] (packages vdr-epgsearch and vdr-streamdev, available on [http://aur.archlinux.org/ AUR]). The former allows you to set autotimers, e.g., you can make VDR record automatically all episodes of Friends or all movies with Al Pacino. The streamdev plugin allows you to stream live tv to other computers over the LAN. You can access LIVE's web interface on port 8008, e.g., http://localhost:8008. For more information have a look at either the [http://live.vdr-developer.org/en/index.php web site] or the documentation in /usr/share/doc/vdr-live/.<br />
<br />
Since LIVE is available on [http://aur.archlinux.org/ AUR], you can install it with the command "yaourt -S vdr-live". In order that a plugin gets started with VDR you have to edit /etc/rc.vdr<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Plive\" \<br />
\"-Pepgsearch\" \<br />
\"-Pstreamdev-server\" \<br />
\"-Pdvdswitch -i /video/dvd\" \<br />
"<br />
</pre><br />
<br />
LIVE does not need additional options, unlike the dvdswitch plugin, which is being started with the "-i" option. The dvdswitch plugin can play DVD images from hard disk, the "-i" option tells the plugin where to look for the DVD images.<br />
<br />
====Plugin Not Available on AUR====<br />
The best thing to do if an plugin, you are interested in, is not available on AUR yet, is to write a PKGBUILD according to the [http://wiki.archlinux.org/index.php/Arch_Packaging_Standards AUR Packaging Standards] and to upload it to AUR in order that others can benefit.<br />
<br />
==Remote Control==<br />
Once VDR is working you might want to control it not only by keyboard, but relax on the couch using a remote control. On one hand, there is [http://www.lirc.org/ LIRC], which works with every DVB card, because it works independently from your DVB card. On the other hand, provided that your DVB device has an integrated IR-reciever, you might give the plugin [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin vdr-remote] a try. Both possibilities will be described here.<br />
<br />
===LIRC===<br />
For installing LIRC see the [http://wiki.archlinux.org/index.php/Lirc ArchWiki]. To setup VDR to make use of your LIRC remote control you have to adjust the file /etc/vdr/remote.conf. The labeling after "LIRC.",e.g., "Up" has to correspond with the labeling in /etc/lircd.conf, the second column stands for the correspondent VDR command.<br />
<br />
<pre><br />
LIRC.Up Up<br />
LIRC.Down Down<br />
LIRC.Menu Menu<br />
LIRC.Ok Ok<br />
LIRC.Back Back<br />
LIRC.Left Left<br />
LIRC.Right Right<br />
LIRC.Red Red<br />
LIRC.Green Green<br />
LIRC.Yellow Yellow<br />
LIRC.Blue Blue<br />
LIRC.0 0<br />
LIRC.1 1<br />
LIRC.2 2<br />
LIRC.3 3<br />
LIRC.4 4<br />
LIRC.5 5<br />
LIRC.6 6<br />
LIRC.7 7<br />
LIRC.8 8<br />
LIRC.9 9<br />
LIRC.Power Power<br />
LIRC.Volume+ Volume+<br />
LIRC.Volume- Volume-<br />
LIRC.Mute Mute<br />
LIRC.Audio Audio<br />
LIRC.Recordings Recordings<br />
LIRC.Info Info<br />
</pre><br />
<br />
Finally, make sure to add the option "--lirc" to /etc/rc.vdr<br />
<pre><br />
VDROPTS="... --lirc"<br />
</pre><br />
<br />
===Remote Plugin===<br />
This plugin only works with cards with build-in IR-recievers, as on Technotrend's full-featured cards. Install the package vdr-remote from [http://aur.archlinux.org/ AUR ] and use the guide on the [http://www.linuxtv.org/vdrwiki/index.php/Remote-plugin VDR Wiki] to set it up.<br />
<br />
=Special Features=<br />
<br />
This part is meant for advanced users of VDR who might get some little hint on how to enhance their VDR installation.<br />
<br />
==Noad - <b>No</b> <b>Ad</b>vertisement==<br />
<br />
[http://noad.freepgs.com/ Noad] is able to detect commercials and to set cutting marks accordingly. The package "noad" is available on AUR. And let me tell you, noad does a great job. Even though I always check the marks before starting the cutting process it is very seldom that I have to correct them within a movie. It is more outside a movie, i.e., within the recording buffer before and after the movie, that sometimes marks have to be manually eliminated.<br />
<br />
By adding the following to the VDROPTS section of the file /etc/rc.vdr, noad is being executed automatically after a recording has been completed.<br />
<br />
<pre><br />
-r'/usr/bin/noad nice -b -O -C -a -j --statisticfile=/video/noadstat'<br />
</pre><br />
<br />
The second possibility is to start the commercial detection process manually from the commands menu of the recordings. Just edit the file /etc/vdr/reccmds.conf and add the following line:<br />
<br />
<pre><br />
start noad: /usr/bin/noad nice --background -O -C -a -j --statisticfile=/video/noadstat<br />
</pre><br />
<br />
As a third possibility you can start noad on the command line. For how to do that and for an explanation of all the command line options check the [http://noad.freepgs.com/README.en.html README] (also available in /usr/share/doc/noad/).<br />
<br />
==Augment VDR's EPG==<br />
<br />
===xmltv2vdr===<br />
Some channels like BBC or ITV do only provide EPG information for the current and the next broadcast which is somewhat unspectacular compared to the standards set by other broadcasting services like ARD (Germany) or ORF (Austria). Fortunately, [http://wiki.xmltv.org/index.php/Main_Page XMLTV] can step into the breach as it is able to get TV-listings for one ore even more weeks in advance. You can follow this [http://wiki.archlinux.org/index.php/XMLTV_HOWTO guide] to install and configure XMLTV.<br />
<br />
The XML-file created by XMLTV has to be converted in order that VDR can use the data. For this purpose the script [http://www.vdr-wiki.de/wiki/index.php/Xmltv2vdr xmltv2vdr] has been written, it is availabe on [http://aur.archlinux.org/ AUR]. Install it and follow the README in /usr/share/doc/xmltv2vdr/. The example file channels.conf has been prepared in /etc/xmltv2vdr:<br />
<br />
<pre><br />
BBC 1 London;BSkyB:10773:h:S28.2E:22000:5000:5001=eng,5002=NAR:5003:1:6301:2:2045:0:london.bbc1.bbc.co.uk<br />
BBC 2 England;BSkyB:10773:h:S28.2E:22000:5100:5101=eng,5102=NAR:5103:1:6302:2:2045:0:london.bbc2.bbc.co.uk<br />
BBC THREE;BSkyB:10773:hC56:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6319:2:2045:0:bbcthree.bbc.co.uk<br />
BBC FOUR;BSkyB:10773:hC56:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6316:2:2045:0:bbcfour.bbc.co.uk<br />
BBC NEWS;BSkyB:11954:hC23:S28.2E:27500:5000:5001=eng:5003:0:6704:2:2013:0:news-24.bbc.co.uk<br />
CBBC Channel;BSkyB:10773:h:S28.2E:22000:5200:5201=eng,5202=NAR:5203:0:6317:2:2045:0:cbbc.bbc.co.uk<br />
CBeebies;BSkyB:10773:h:S28.2E:22000:5300:5301=eng,5302=NAR:5303:0:6318:2:2045:0:cbeebies.bbc.co.uk<br />
ITV1 London;BSkyB:10759:vC56:S28.2E:22000:2305:2312=eng,2314=NAR:2315:0:10060:2:2044:0:carlton.com<br />
ITV2;BSkyB:10759:vC56:S28.2E:22000:2352:2354=eng,2356=NAR:2358:0:10070:2:2044:0:itv2.itv.co.uk<br />
ITV3;BSkyB:10906:vC56:S28.2E:22000:2362:2356=eng,2357=NAR:2359:0:10260:2:2054:0:itv3.itv.co.uk<br />
ITV4;BSkyB:10759:vC56:S28.2E:22000:2359:2360=eng,2361=NAR:2362:0:10072:2:2044:0:itv4.itv.co.uk<br />
Film4;BSkyB:10714:hC56:S28.2E:22000:2346:2347=eng,2348=NAR:2349:0:9220:2:2041:0:filmfour.channel4.com<br />
More4;BSkyB:10729:vC56:S28.2E:22000:2361:2362=eng,2363=NAR:2364:0:8340:2:2042:0:more4.channel4.com<br />
E4;BSkyB:10729:vC56:S28.2E:22000:2315+2306:2317=eng,2319=NAR:2321:0:8305:2:2042:0:e4.channel4.com<br />
</pre><br />
<br />
<br />
You can create a cronjob to get the updating of the EPG data done automatically, your crontab could look like this:<br />
<pre><br />
00 00 * * * tv_grab_uk_rt --config-file ~/.xmltv/tv_grab_uk_rt.conf --quiet > /tmp/uk.xml<br />
05 00 * * * xmltv2vdr.pl -x /tmp/uk.xml -c /etc/xmltv2vdr/channels.conf<br />
</pre><br />
<br />
===vdraepg===<br />
[http://www.vdrportal.de/board/thread.php?postid=632294 vdraepg] is a Ruby-script which transfers EPG-data from one channel to another, i.e., the data is not being downloaded from the Internet as with XMLTV, but is already present in VDR's EPG-information.<br />
<br />
This makes sense in some cases when, for example, a channel is available on DVB-T, but does not have as elaborate an EPG as the same channel on DVB-S (which, for instance, might even be encrypted). The script can also be used to change the time information. So the script can transfer EPG-data from, e.g., ITV2 to ITV2+1, just by adding one hour to the EPG-information from ITV2.<br />
<br />
You can install the package vdraepg from [http://aur.archlinux.org/ AUR]. Read the file /usr/share/doc/vdraepg/README.en for instructions on how to set vdreapg up. An example configuration has been prepared (etc/vdraepg/vdraepg.conf)<br />
<pre><br />
#source-channel, target-channel, time-adjustment<br />
S28.2E-2-2044-10070, S28.2E-2-2041-10172, 60 #itv2, itv2+1<br />
S28.2E-2-2054-10260, S28.2E-2-2054-10261, 60 #itv3, itv3+1<br />
S28.2E-2-2042-8335, S28.2E-2-2042-8330, 60 #film4, film4+1<br />
S19.2E-1-1101-28106, T-0-562-1, 0 #ARD, DVBS --> DVB-T<br />
</pre><br />
<br />
Again it might make sense for you to have vdraepg run as a cronjob:<br />
<pre><br />
10 00 * * * vdraepg.rb<br />
</pre><br />
<br />
==Integrating VDR into the Multimedia Center Oxine==<br />
VDR, being an excellent, some even say the best, software for dealing with watching and recording DVB, still has some flaws compared to MMCs (multimedia center) like MythTV. Nevertheless, compared to VDR those MMCs have deficits when it comes to dealing with watching and recording DVB. Therefore, it could be a good idea to combine the strengths. The good news is, this is possible. With [http://oxine.sourceforge.net/ Oxine] exists a MMC which is capable of integrating VDR perfectly into its interface.<br />
<br />
The "extra" repository includes the package oxine, unfortunately its configuration does not make the integration of VDR possible. On AUR, though, a package named oxine-vdr does away with this limitation. That said you should easily be able to activate VDR in Oxine's settings pages, just go to "Edit Settings", "Television" and change "type of television" to "video disk recorder". A dependency of oxine-vdr is the VDR plugin [http://home.vrweb.de/~rnissl/ vdr-xine], it has to be started with the option "-r" in order that oxine can connect:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r\" \ <br />
"<br />
</pre><br />
<br />
==Streaming VDR==<br />
<br />
===Local Area Network===<br />
Imagine having your computer running VDR somewhere in your study, living room, or even in your cellar and watching live tv and recordings provided by the same VDR on a deck chair in your garden. This whish can be put into practice.<br />
<br />
The very same plugin that we already [[VDR#Xine_-_Full-Featured_and_Budget_Cards | used with budget cards]] and also to [[VDR#Integrating_VDR_into_the_Multimedia_Center_Oxine | integrate VDR into Oxine]] we are going to use again to show the VDR frontend on any computer on the LAN or WLAN: [http://home.vrweb.de/~rnissl/ vdr-xine]. You just have to start the plugin with the "-p" parameter:<br />
<br />
<pre><br />
VDRPLUGINS=" \"-Pxine -r -p\" \<br />
"<br />
</pre> <br />
<br />
On the remote computer install the packages xine-lib-vdr and xine-ui-vdr, availabe on [http://aur.archlinux.org/ AUR].<br />
<br />
Adjust the file ~/.xine/keymap as described [[ VDR#Xine_-_Full-Featured_and_Budget_Cards | above [] to control VDR with the keyboard. <br />
<br />
Now watch your favorite movies any place in and around your house:<br />
<br />
<pre><br />
xine "netvdr://<ip of VDR server>#demux:mpeg_pes" -D<br />
</pre><br />
<br />
===Internet===<br />
<br />
[http://www.videolan.org/vlc/ VLC] is not only a well known multimedia player, but is also perfectly suited to encode and stream video and audio. Therefore, we use it to grab audio and video from a full-featured card to encode and stream it over the Internet. You need to install the packages vlc and lame. Adjust "vb=250" (video bit rate) and "ab=48" (audio bit rate) to your upload speed. The two values in the example work great with an upstream of 384 Kbit/sec.<br />
<br />
<pre><br />
/usr/bin/cvlc -d v4l:// :v4l-vdev="/dev/video0" :v4l-adev="/dev/dsp" :v4l-norm=3 :v4l-frequency=-1 --sout #transcode{vcodec=h264,vb=250,scale=0.5,acodec=mp3,ab=48,channels=1}:duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}'<br />
</pre><br />
<br />
On the remote computer you can open the stream with the following command. If the computer running VDR is behind a router, make sure the port 1234 is being forwarded.<br />
<br />
<pre><br />
vlc http://<your dyndns>:1234<br />
</pre><br />
<br />
You can control the remote VDR with either the LIVE plugin or SVDRP software like [http://www.chrisz.de/blog/?p=61 "VDR Remote Control"] (rather unsecure, since the SVDRP port has to be forwarded on your router). You can even use your iPhone or iPod Touch with the application [http://www.vdr-wiki.de/wiki/index.php/ZapperPro ZapperPro], available in the Apple Store. As a requirement you need access to to the Internet through WLAN. Be careful regarding the security issue when opening the SVDRP port to the Internet.<br />
<br />
==Rip a DVD==<br />
There are several possibilities to rip DVDs with the help of VDR. I am going to show you a quite simple, but nevertheless effective one. The only packages you need to install are screen and dvdbackup. Dvdbackup automatically gets the title of the DVD and sets the name of the target directory accordingly. In order that you can start the ripping process from within VDR you have to add the following line to /etc/vdr/commands.conf:<br />
<br />
<pre><br />
Rip DVD : screen -dm sh -c "/usr/bin/dvdbackup -M -i/dev/dvd -o/video/dvd"<br />
</pre><br />
<br />
You might have to adjust the "-i" (input device) and the "-o" (output folder) option to your needs. The "-M" option backs up the whole DVD including the menu structure. You can alter this, have a look at the available options (dvdbackup -h).<br />
<br />
Start ripping a DVD from within VDR's Commands menu. If you want to play the ripped DVD image with VDR, you can use the plugin [http://www.vdr-wiki.de/wiki/index.php/Dvdswitch-plugin vdr-dvdswitch], available on [http://aur.archlinux.org/ AUR].<br />
<br />
=Conclusion=<br />
I remember having almost given up on setting up VDR on Arch Linux at the very beginning because of the problem mentioned above with the wrongly loaded module for my full-featured card. This guide might help some of you to also get beyond the point of only trying to get VDR up and running. I can only encourage you to try out VDR as it is a really terrific piece of software with a wide range of possibilities.<br />
<br />
This guide is not intended to be complete and it never will be. Hopefully, with the cooperation of you guys it will become more and more detailed and useful.<br />
<br />
=References=<br />
* [http://www.cadsoft.de/vdr/ VDR Homepage]<br />
* [http://www.linuxtv.org/vdrwiki/index.php/Main_Page VDR Wiki]<br />
* [http://www.vdr-portal.de/board/portal.php German User Forum]</div>Franzb