📄 install
字号:
Installation of the Video Disk Recorder---------------------------------------Version 1.5-----------Compiling and running the program:----------------------------------VDR requires the Linux-DVB driver header files to compile.As of kernel 2.6 these are part of the official Linux kerneldistribution, and so they should be automatically found in/usr/include/linux/dvb. If your DVB driver header files arein a different location, you can rename the file Make.config.templateto Make.config and adjust the definition of DVBDIR in that file.Refer to http://linuxtv.org for more information about the Linux-DVB driver.VDR requires the Linux-DVB driver version dated 2003-08-23 or higherto work properly.You will also need to install the following libraries, as well as their"devel" packages to get the necessary header files for compiling VDR: fontconfig freetype2 gettext libcap libjpegIf the "capability" module is not compiled into your kernel, you mayneed to do "modprobe capability" before running VDR.After extracting the package, change into the VDR directoryand type 'make'. This should produce an executable filenamed 'vdr', which can be run after the DVB driver has beeninstalled.IMPORTANT: See "Configuration files" below for information on how========= to set up the configuration files at the proper location!By default the 'vdr' program can be controlled via the PC keyboard.If you want to disable control via the keyboard, you can add NO_KBD=1to the 'make' call, or use the '--no-kbd' option at runtime.If you have an infrared remote control unit you can define the REMOTE macroto one of the following values in the 'make' call to make the respective controlthe default: REMOTE=RCU control via the "Remote Control Unit" receiver (see http://www.cadsoft.de/vdr/remote.htm) REMOTE=LIRC control via the "Linux Infrared Remote Control" (see http://www.lirc.org)Alternatively you can use the '--rcu' or '--lirc' options at runtime.These options accept an optional path to the remote control device,the defaults of which can be set via the RCU_DEVICE and LIRC_DEVICE macros,respectively.If your video directory will be on a VFAT partition, add the compiletime switch VFAT=1to the 'make' command. Alternatively, you can call VDR with the commandline option '--vfat'.When running, the 'vdr' program writes status information into thesystem log file (/var/log/messages). You may want to watch thesemessages (tail -f /var/log/mesages) to see if there are any problems.The program can be controlled via a network connection to its SVDRPport ("Simple Video Disk Recorder Protocol"). By default, it listenson port 2001 (use the --port=PORT option to change this). For detailsabout the SVDRP syntax see the source file 'svdrp.c'.WARNING: DUE TO THE OPEN SVDRP PORT THIS PROGRAM MAY CONSTITUTE A======= POTENTIAL SECURITY HAZARD! IF YOU ARE NOT RUNNING VDR IN A CONTROLLED ENVIRONMENT, YOU MAY WANT TO DISABLE SVDRP BY USING '--port=0'!The file 'svdrphosts.conf' can be used to define which hosts are allowedto access the SVDRP port. By default only localhost (127.0.0.1) is grantedaccess. If you want to give other hosts access to your SVDRP port you need toadd their IP numbers to 'svdrphosts.conf'.If the program shall run as a daemon, use the --daemon option. Thiswill completely detach it from the terminal and will continue as abackground process.When starting the program through an entry in /etc/inittab, use the --terminaloption to set the controlling terminal, as invdr:123:respawn:/usr/local/bin/vdr --terminal=/dev/tty8 -w 60See the man page vdr(1) for complete information about all command line options.Locale------When presenting the list of recordings, VDR sorts the entries according tothe current "locale" settings. This makes sure that special characters (likethe German "umlauts") appear at the expected positions. In order to benefitfrom this you may have to set the locale environment variable, for instance export LANG=de_DEfor a German locale. If you don't want this to result in German error messagesin the log file, it is sufficient to just set export LC_COLLATE=de_DEwhich only influences the way strings are sorted and leaves error messagesin English.Automatic restart in case of hangups:-------------------------------------If you run VDR using the 'runvdr' shell script it will use the built-inwatchdog timer to restart the program in case something happens thatcauses a program hangup. If you change the command line options for thecall to the VDR program, be sure to NOT use the '-d' option! OtherwiseVDR will go into 'daemon' mode and the initial program call will returnimmediately! 'runvdr' needs to be started as user 'root'. Use the '-u'option to run the actual 'vdr' program under a different user id.Note that the 'runvdr' script needs to be adjusted to your particularrequirements before you can actually use it. See the comments insidethe script for more information.Setting the system time:------------------------If you want VDR to set the system time according to the data receivedfrom the transponder, you need to start VDR as user 'root'. For securityreasons you should then use the '-u' option to define a lesser privilegeduser id under which VDR should actually run. It will then only keep thecapability to set the system time, and set its user id to the given one.You also need to enable the "EPG/Set system time" option in VDR'sSetup menu, and select a transponder from which you want to receivethe time in "Use time from transponder". Make sure you select a transponderthat has a reliable clock - some transponders are quite off.Automatic shutdown:-------------------If you define a shutdown command via the '-s' command line option, VDRwill call the given command if there is currently no recording or replayactive, the user has been inactive for at least MinUserInactivity minutesand the next timer event is at least MinEventTimeout minutes in the future(see the Setup parameters in MANUAL).The command given in the '-s' option will be called with five parameters.The first one is the time (in UTC) of the next timer event or plugin wakeuptime (as a time_t type number), and the second one is the number ofseconds from the current time until the next timer event. Your program canchoose which one to use for programming some sort of hardware device thatmakes sure the computer will be restarted in time before the next timerevent. Your program must also initiate the actual shutdown procedure of thecomputer. VDR will not automatically exit after calling the shutdownprogram, but will rather continue normally until it receives a SIGTERM whenthe computer is actually shut down. So in case the shutdown fails, or theshutdown program for some reason decides not to perform a shutdown, VDRwill stay up and running and will call the shutdown program again after awhile. The command will be started in a separate background session, so itcan continue to run even after VDR has terminated.If there are currently no timers active and there is no plugin wakeuptime, both parameters will be '0'. In that case the program shall not setthe hardware for automatic restart and only perform the system shutdown.A program that uses the second parameter to set the hardware for restartmust therefore also check whether the first parameter is '0'.If the wakeup time is given by a timer, the third parameter will be thenumber of the channel that will be recorded, otherwise it will be 0. Thefourth parameter contains the file name of the recording as defined in thetimer, the name of the plugin that requested the wakeup time, or an emptystring if no wakeup time is present. These can be used by the shutdownprogram to show that information on some display interface etc.The fifth parameter indicates the reason why the shutdown was requested.'0' means this is an automatic shutdown due to some timeout, while '1' meansthat this is a user requested shutdown (resulting from pressing the "Power"key). The shutdown program may use this information to decide whether ornot to actually perform the system shutdown.If a timer is currently recording, or a recording would start within thenext 30 minutes (default for the "Min. event timeout" setup parameter), andthe user insists in shutting down now, the first and second parameter willcorrespond to a time that is "Min. event timeout" minutes in the future.Before the shutdown program is called, the user will be prompted to informhim that the system is about to shut down. If any remote control key ispressed while this prompt is visible, the shutdown will be cancelled (andtried again later). The shutdown prompt will be displayed for 5 minutes, whichshould be enough time for the user to react.A sample shell script to be used with the '-s' option might look like this:#!/bin/shsetRTCwakeup $(($1 - 300))sudo haltHere 'setRTCwakeup' would be some program that uses the first parameter(which is the absolute time of the next timer event) to set the Real TimeClock so that it wakes up the computer 5 minutes (i.e. 300 seconds) beforethat event. The 'sudo halt' command then shuts down the computer.You will have to substitute both commands with whatever applies to yourparticular hard- and software environment.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -