It's something like a luxury settop box/pvr on a pc to receive/watch/record/stream digital tv channels with epg (electronic program guide), timers, client/server networking, webinterface etc pp. So if you have a FreeBSD (or Linux, but that's not covered here :) ) server you can add one or more dvb/atsc tuner(s) connected to a satellite dish, cable tv or just a dvb-t antenna (or receive iptv streams without a tuner if your isp provides those tho I don't know if anyone tested `real' iptv on FreeBSD yet), browse/search epg, set timers for automated or manual recordings, and watch the streams/recordings elsewhere on your lan. Or if you have a FreeBSD desktop you can also connect a tuner there and do it all on one box - or just run a vdr client like vdr-sxfe (installed by the multimedia/vdr-plugin-xineliboutput port) or a client vdr instance using the streamdev-client plugin connected to a (possibly Linux) vdr server elsewhere on your lan.
So if your isp doesn't provide iptv, https://secure.wikimedia.org/wikipedia/en/wiki/IPTV (german info page: http://www.iptv-anbieter.info/) then you'll need a dvb tuner (or atsc, tho I have no idea if anyone tested that with vdr on FreeBSD yet) with corresponding v4l/dvb (`v4b') drivers, in most cases that means an usb tuner supported by the webcamd port: http://www.freshports.org/multimedia/webcamd
And finally, if you want to compare vdr to other existing ports, it's a bit like MythTV - only most Linux users _I_ know prefer vdr over mythtv. :) (and vdr also doesn't use a rdbms so you don't have to worry about mysql etc.)
VDR 1.7.x is the development branch so bugs are possible! (I mostly used it because the stable branch (1.6) doesn't support dvb-s2 and h264, and there sure are other projects where development branches are more buggy than with vdr. :) )
pw groupmod webcamd -m vdr
# vdr
vdr_flags="'-Pxineliboutput --local=none --remote=127.1:37890' \
-Pskinenigmang -Pfemon -Posdpip \
'-Posdteletext --cache-system=packed --max-cache=128' \
-Pstreamdev-server '-Plive -i127.1' -Pepgsearch -Pcontrol \
-Pinfosatepg -Piptv -Pwirbelscan -Preelchannelscan -Pttxtsubs \
-Pvnsiserver -Pextrecmenu"
look in the README.s of the individual plugin ports for any needed options. (should get installed below /usr/local/share/doc/vdr*) And if you want vdr to start at boot (instead of just manually by doing: /usr/local/etc/rc.d/vdr onestart ) you need to set: vdr_enable=“YES” too of course. And for vdradmin-am its: vdradmind_enable=“YES”
If you want to start vdr manually in the foreground instead you need to be root (or the vdr user but vdr also drops to the vdr uid itself if started as root), and then run it like:
vdr '-Pxineliboutput --local=none --remote=127.1:37890' -Pskinenigmang -Pfemon -Posdpip '-Posdteletext --cache-system=packed --max-cache=128' -Pstreamdev-server '-Plive -i127.1' -Pepgsearch -Pcontrol -Pinfosatepg -Piptv -Pwirbelscan -Preelchannelscan -Pttxtsubs -Pvnsiserver -Pextrecmenu
I only very recently was able to test xineliboutput's vdpau/vaapi support and it turned out I had to add patches to the libxine port, so if you want to use that make sure it and ffmpeg are up to date and built with the VDPAU and VAAPI knobs on. To test vdpau you can try something like: (vdr-sxfe gets installed by the xineliboutput plugin port)
vdr-sxfe --hotkeys --video=vdpau --post tvtime:method=use_vo_driver,use_progressive_frame_flag=1 --audio=oss --reconnect xvdr+tcp://127.1
[note: if xvdr+tcp://127.1 doesn't work try xvdr:// - and if you want to connect over tcp in the osd go to “Menu → Setup → Plugins → xineliboutput → Remote clients” and enable “Allow remote clients, make sure the listen address is correct and that the remote hosts are allowed in /usr/local/etc/vdr/plugins/xineliboutput/allowed_hosts.conf - see the section below about remote.conf and keyboard control.]
if that looks jerky or doesn't work with hd material maybe your card cannot handle the default vdpau deinterlacing method, you can change that in ~/.xine/config_xineliboutput, for an `old' ION I use: video.output.vdpau_deinterlace_method:half temporal
And vaapi is used via xv, just for nvidia this needs the multimedia/vdpau-video port installed (other cards I think we don't have support for yet), and in ~/.xine/config_xineliboutput video.processing.ffmpeg_enable_vaapi should not be set to 0:
vdr-sxfe --hotkeys --video=xv --post=tvtime:method=Linear,cheap_mode=1,pulldown=0,use_progressive_frame_flag=1 --audio=oss --reconnect xvdr+tcp://127.1:37890
An overview of which nvidia cards support which vdpau feature is here: http://www.mythtv.org/wiki/VDPAU
You can also use the multimedia/vdpauinfo port to check vpdau features of your nvidia card. On the radeon here using xorg 7.4's video-ati driver with the same xineliboutput xv settings but without vaapi vdr-sxfe as well as all other players I tested that knew the xvdr protocol (xineliboutput with osd) can also play h264 hd channels on this PhenomII box after the ffmpeg updates last year(?), with the only exception of kaffeine that still has issues with h264 1080i streams when deinterlacing is enabled:
xine "xvdr://127.0.0.1#nocache" kaffeine "xvdr+tcp://127.0.0.1:37890" /usr/local/kde4/bin/kaffeine "xvdr+tcp://127.0.0.1:37890"
(kaffeine also has no provision for vdr keyboard control…)
If you don't use vdpau (I think that conflicts with compositing) you can now also try compositing and running vdr-sxfe with –hud for a somewhat nicer rendered osd, –video opengl (and vdpau as mentioned) support is now also in the build.
Btw I use software volume control with xineliboutput (Menu → Setup → Plugins → xineliboutput → Volume control in the osd) because selecting `hardware' there doesn't work so well with snd(4)'s volume-per-channel feature (hint.pcm.X.vpc, which also in fact is software) that I want to keep enabled for other apps… And in case you didn't know about this snd(4) feature you can read more here: http://people.freebsd.org/~ariff/SOUND_4.TXT.html
You can also use other players like mplayer or totem/gstreamer (incluing the totem browser plugin invoked by the vdr-live webinterface), only those don't know the xvdr protocol and thus wont display an osd:
mplayer -mc 10 -cache 8192 -demuxer lavf http://127.0.0.1:37890/ totem http://127.0.0.1:37890/
(or using streamdev:
mplayer -mc 10 -cache 8192 -demuxer lavf http://127.0.0.1:3000/302 totem http://127.0.0.1:3000/302 vlc http://127.0.0.1:3000/302
channel 302 is arte hd in my channels.conf.)
xhost +127.1
(this allows everyone on localhost to access the xserver) or: (possibly better, allowing only the vdr user)
xhost +si:localuser:vdr
and then start vdr with:
vdr '-Psofthddevice -d :0.0 -v vdpau' ..
(or change vdr_flags in rc.conf(5) so that it starts with
vdr_flags="'-Psofthddevice -d :0.0 -v vdpau' ..
and then make sure vdr is started only after the xserver is running.)
To test it so that it starts its own xserver:
vdr '-Psofthddevice -x -v vdpau' ..
(or similarly put this in vdr_flags.)
Note: don't forget to (re)build multimedia/ffmpeg with VDPAU and/or (if you use it) VAAPI support, else the plugin won't work.
/usr/local/share/xbmc/system/keymaps/keyboard.xml
And there is some imcomplete documentation at the xbmc wiki:
http://wiki.xbmc.org/index.php?title=HOW-TO:Watch_TV_in_XBMC
And some general xbmc documentation:
http://wiki.xbmc.org/index.php?title=XBMC_Online_Manual
And as with vdr-sxfe xbmc also can be built with vdpau (and vaapi) support, if you did that you can go in system → settings → video → playback and enable vdpau. xbmc's default lirc map is here:
/usr/local/share/xbmc/system/Lircmap.xml
and you can put a custom one in ~/.xbmc/userdata/Lircmap.xml .
And if you use xine xine “xvdr://127.0.0.1#nocache” instead of vdr-sxfe vdr-sxfe –video=xv –hotkeys –audio=oss xvdr+tcp://127.0.0.1:37890 you probably want to use a ~/.xine/keymap that includes vdr controls, I've put mine here: http://people.freebsd.org/~nox/dvb/xine/keymap and the xineliboutput plugin port now also installs it under: /usr/local/share/examples/vdr-plugin-xineliboutput/xine/keymap
Oh and the webinterfaces have point-and-click remotes too but those are pretty clunky to use…
Again the following is not for XBMC-PVR which has its own independent OSD:
Once you have verified that irw correctly reports buttons pressed on the remote you can start vdr with –lirc, if the osd then doesn't prompt you to assign buttons on the remote stop vdr and do: touch /usr/local/etc/vdr/channels.conf and/or remove previous lirc-related entries out of /usr/local/etc/vdr/remote.conf .
I think the minimal buttons you need to assign for vdr are menu, back, ok, the cursor buttons (up, down, left, right), the digits (0-9), and the colours (red, green, yellow, blue) - and you probably also want at least volume up/down/mute and buttons to invoke the audio channel and subtitle submenus. (and next on the list are record, play, pause, stop, fast forward, rewind, next, prev.) See /usr/local/share/doc/vdr/MANUAL for more info.
Once the remote.conf is setup for lirc you can also start vdr-sxfe with –lirc instead of passing –lirc to vdr itself so you can use the remote to control other apps when vdr-sxfe isn't running (like xbmc), otherwise vdr would be interpreting the buttons all the time. Or you can disable lirc control temporarily in vdr by invoking: svdrpsend remo off and enable it again by: svdrpsend remo on – see here for some other things you can control that way: http://www.linuxtv.org/vdrwiki/index.php/SVDRP
http://channelpedia.yavdr.com/gen/
) you can use the multimedia/w_scan port. Remember to use -o7 for vdr 1.7.x, see the w_scan(1) manpage and its homepage for options and examples: http://wirbel.htpc-forum.de/w_scan/index_en.html (the w_scan start script hasn't been ported to FreeBSD yet.)
sed -i.bak -e s/:v/:V/ -e s/:h/:H/ -e s/:l/:L/ -e s/:r/:R/ channels.conf
Also note you probably will only need to use w_scan once initially, this vdr version by default should look for new transponders itself when it does its epg scan during idle times unles you disable that feature.
The reelchannelscan plugin should put an entry in the main menu like Menu → Channel scan, wirbelschan needs to be invoked from Menu → Setup → Plugins → wirbelscan.
And the streamdev-server plugin has a (simple) webinterface too if you point a browser at it: (instead of a player) http://127.1:3000/
By popular demand, here is how you should be able to get a new vdr installation up quickly:
portmaster multimedia/vdr-plugins
mkdir /some/dir/with/space/video ln -s /some/dir/with/space/video /video chown vdr:vdr /video
chmod o+x /var/cache
pw groupmod webcamd -m vdr
# vdr
vdr_flags="'-Pxineliboutput --local=none --remote=127.1:37890' \
-Pskinenigmang -Pfemon -Posdpip \
'-Posdteletext --cache-system=packed --max-cache=128' \
-Pstreamdev-server '-Plive -i127.1' -Pepgsearch -Pcontrol \
-Pinfosatepg -Piptv -Pwirbelscan -Preelchannelscan -Pttxtsubs \
-Pvnsiserver -Pextrecmenu"
(in general plugin vdr-plugin-foo is loaded by -Pfoo and may take args explained in /usr/local/share/doc/vdr-plugin-foo/README, like '-Pfoo -bar -baz' - so if you want to use, say, vdr-plugin-vdrmanager also then add -Pvdrmanager.)
ls -lR /dev/dvb
(there should be at least one adapterX dir with demux0, dvr0, and frontend0 device nodes) See also this forum thread for hints about drivers providing /dev/dvb nodes: http://forums.freebsd.org/viewtopic.php?t=35179
echo 'vdr_waitdvb="NO"' >>/etc/rc.conf
/usr/local/etc/rc.d/vdr onestart
portmaster www/vdradmin-am
(As mentioned above I'm fine with the live web plugin myself and don't really use vdradmin-am.)
:charset=ISO8859-15:\ :lang=en_US.ISO8859-15:\
to the default: entry in /etc/login.conf and after that running:
cap_mkdb /etc/login.conf
You can get more fancy like by adding a login class to vdr's passwd(5) entry (or a giving it a homedir,
pw usermod vdr -d /video
and then putting a ~vdr/.login_conf file there like this:
me:\
:charset=ISO8859-15:\
:lang=en_US.ISO8859-15:\
:tc=default:
); more details are available in manpages like login.conf(5), pw(8), passwd(5), and a related handbook chapter: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/using-localization.html
And there also is the mostly german-language vdr portal: http://vdr-portal.de/ and I think I saw at least a russian-language vdr webforum too. (tho I don't speak russian.)