Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jul 2010 18:46:31 +0200
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        Juergen Lock <nox@jelal.kn-bremen.de>
Cc:        freebsd-multimedia@FreeBSD.org, lme@FreeBSD.org
Subject:   Re: for those that want to try vdr on FreeBSD...  (dvb with webcamd)
Message-ID:  <20100710164631.GA6687@triton8.kn-bremen.de>
In-Reply-To: <20100626212441.GA2871@triton8.kn-bremen.de>
References:  <20100502190207.GA96276@triton8.kn-bremen.de> <20100504203248.GA8212@triton8.kn-bremen.de> <20100506201305.GA23951@triton8.kn-bremen.de> <20100514171150.GA51257@triton8.kn-bremen.de> <20100516224525.GA48612@triton8.kn-bremen.de> <20100518190247.GA95111@triton8.kn-bremen.de> <20100520175952.GA90477@triton8.kn-bremen.de> <20100624190936.GA1265@triton8.kn-bremen.de> <20100626212441.GA2871@triton8.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 26, 2010 at 11:24:41PM +0200, Juergen Lock wrote:
> On Thu, Jun 24, 2010 at 09:09:36PM +0200, Juergen Lock wrote:
> > On Thu, May 20, 2010 at 07:59:52PM +0200, Juergen Lock wrote:
> > > On Tue, May 18, 2010 at 09:02:47PM +0200, Juergen Lock wrote:
> > > > On Mon, May 17, 2010 at 12:45:25AM +0200, Juergen Lock wrote:
> > > > > On Fri, May 14, 2010 at 07:11:50PM +0200, Juergen Lock wrote:
> > > > > > On Thu, May 06, 2010 at 10:13:06PM +0200, Juergen Lock wrote:
> > > > > > > On Tue, May 04, 2010 at 10:32:48PM +0200, Juergen Lock wrote:
> > > > > > > > On Sun, May 02, 2010 at 09:02:07PM +0200, Juergen Lock wrote:
> > > > > > > > > Hi!
> > > > > > > > > 
> > > > > > > > >  I took jpulz' vdr 1.7.14 patches: (hi, you never seem to be on irc
> > > > > > > > > when I am... :)
> > > > > > > > > 
> > > > > > > > > 	ftp://ftp.frm2.tum.de/pub/jpulz/VDR/
> > > > > > > > > 	ftp://ftp.frm2.tum.de/pub/jpulz/pictures/
> > > > > > > > > 
> > > > > > > > > and made q&d ports of those and of a few more plugins and two webinterfaces
> > > > > > > > > so I can now use FreeBSD as a pc dvb-s2 dvr:
> > > > > > > > > 
> > > > > > > > > 	http://people.freebsd.org/~nox/dvb/vdrdevel-preliminary.shar
> > > > > > > > > 
> > > > > > > > >  I don't know if/when I'll be able finish these to make them commit-ready
> > > > > > > > > (or even port all of the other plugins that people might want to use),
> > > > > > > > > if anyone wants to take over from here or at least help they are most
> > > > > > > > > welcome...
> > > > > > > > > 
> > > > > > > > >  Note: vdr 1.7.14 is the development branch so expect bugs!  (I mostly
> > > > > > > > > used it because the stable branch (1.6) doesn't support dvb-s2...)
> > > > > > > > > 
> > > > > > > > >  FreeBSD notes:
> > > > > > > > > 
> > > > > > > > > 0. See my earlier threads on the freebsd-multimedia list about webcamd
> > > > > > > > >    and the usb dvb-s2 tuner I use; the relevant webcamd ports and
> > > > > > > > >    frieds have been updated now so you _should_ be able to just use
> > > > > > > > >    those.  (I see no reason why dvb-t or dvb-c tuners wouldn't work
> > > > > > > > >    also as long as webcamd supports them, I just haven't tested any.)
> > > > > > > > > 
> > > > > > > > > 1. Before you start installing these ports add the vdr user and group
> > > > > > > > >    to /usr/ports/UIDs:
> > > > > > > > > 
> > > > > > > > > 	vdr:*:988:988::0:0:vdr user:/nonexistent:/usr/sbin/nologin
> > > > > > > > > 
> > > > > > > > >    and to /usr/ports/GIDs:
> > > > > > > > > 
> > > > > > > > > 	vdr:*:988:
> > > > > > > > > 
> > > > > > > > >    (you don't have to use 988, I just didn't want the id to conflict with
> > > > > > > > >    new ports being committed too quickly...), and then either mount an extra
> > > > > > > > >    fs with enough space for the recordings on /video or create a video dir
> > > > > > > > >    elsewhere where there is space, symlink it to /video and make it
> > > > > > > > >    writable for vdr.  (or if you do have one big / then you can create
> > > > > > > > >    the dir on there too ofc, I just disabled the mkdir in the port to
> > > > > > > > >    avoid inadvertently filling up ppl's small / fs.)
> > > > > > > > > 
> > > > > > > > > 2. I didn't make rc.d scripts yet so for now you need to start vdr as
> > > > > > > > >    well as the vdradmin-am webinterface manually, look in the README.s
> > > > > > > > >    of the individual (plugins, vdradmin-am) ports for any needed options.
> > > > > > > > >    My current vdr startup line is:
> > > > > > > > > 
> > > > > > > > > 	vdr -P"xineliboutput --local=none --remote=127.1:37890" -Pskinenigmang -Pfemon -Posdpip '-Posdteletext --directory=/usr/tmp --cache-system=packed --max-cache=128' -P"streamdev-server" -P"live -i127.1" -Pepgsearch -Pcontrol
> > > > > > > > > 
> > > > > > > > >    Oh and I skipped install of a lot of locales for now too...
> > > > > > > > > 
> > > > > > > > > 3. Of all the video output methods only xineliboutput and streamdev
> > > > > > > > >    seem to work (and the vdr-live webinterface browser streaming which
> > > > > > > > >    also uses streamdev), jpulz also has patches for softdevice so I made
> > > > > > > > >    a port for that too but it only gave me a black screen...  streamdev
> > > > > > > > >    doesn't have an osd so you probably want xineliboutput at least for
> > > > > > > > >    the first setup.
> > > > > > > > > 
> > > > > > > > >    I was unable to test xineliboutput's vdpau support since I no longer
> > > > > > > > >    have nvidia (and miwi's issues with the nvidia blob on amd64 don't
> > > > > > > > >    exactly encourage me to try it again soon...) - on the radeon here
> > > > > > > > >    using xorg 7.4's video-ati driver with xv xineliboutput via vdr-sxfe,
> > > > > > > > > 
> > > > > > > > > 	vdr-sxfe --video=xv --hotkeys xvdr://127.0.0.1:37890
> > > > > > > > > 
> > > > > > > > >    (vdr-sxfe gets installed by the xineliboutput plugin port) as well as any
> > > > > > > > >    other player that knew the xvdr protocol (xineliboutput with osd) were
> > > > > > > > >    unable to play h264 hd channels (I suspect they use too much cpu; I tried
> > > > > > > > >    xine and both the kde3 and kde4 versions of kaffeine,
> > > > > > > > > 
> > > > > > > > > 	xine "xvdr://127.0.0.1#nocache"
> > > > > > > > > 	kaffeine "xvdr+tcp://127.1:37890"
> > > > > > > > > 	/usr/local/kde4/bin/kaffeine "xvdr+tcp://127.1:37890"
> > > > > > > > > 
> > > > > > > > >    ), only mplayer and (sometimes) totem/gstreamer (incluing the totem
> > > > > > > > >    browser plugin invoked by the vdr-live webinterface) apparently were
> > > > > > > > >    efficient enough to decode h264 on this PhenomII cpu in software:
> > > > > > > > > 
> > > > > > > > > 	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
> > > > > > > > > 
> > > > > > > > >    - channel 302 is arte hd in my channels.conf.)
> > > > > > > > > 
> > > > > > > > > 4. I have no idea if the lirc support works on FreeBSD (and webcamd doesn't
> > > > > > > > >    seem to support dvb tuner remotes yet anyway), so you probably will
> > > > > > > > >    have to use keyboard control for now.  I have included an example
> > > > > > > > >    remote.conf for vdr-sxfe and the multimedia/vdr-plugin-control plugin
> > > > > > > > >    that you can access by telnet (default port is 2002), I have put the
> > > > > > > > >    menu button on the tab and insert keys and OK on the return key, see
> > > > > > > > > 
> > > > > > > > > 	/usr/local/etc/vdr/remote.conf
> > > > > > > > > 
> > > > > > > > >    for the full keybindings list.  (If you start vdr in the foreground
> > > > > > > > >    and keep that shell open you should be able to use that for keyboard
> > > > > > > > >    control also, the control plugin just gives me an osd too for when I
> > > > > > > > >    use mplayer...)
> > > > > > > > > 
> > > > > > > > >    Oh and the webinterfaces have point-and-click remotes too but I prefer
> > > > > > > > >    keyboard control.
> > > > > > > > > 
> > > > > > > > > 5. The example channels.conf is the one that comes with the vdr sources,
> > > > > > > > >    its for Astra 19.2E and a little outdated (also doesn't have hd channels
> > > > > > > > >    yet), if you receive something else and don't want to go hunting for a
> > > > > > > > >    suitable channels.conf on the web you can use w_scan for which I put a
> > > > > > > > >    port here earlier:
> > > > > > > > > 
> > > > > > > > > 	http://people.freebsd.org/~nox/dvb/w_scan.shar
> > > > > > > > > 
> > > > > > > > >    Remember to use -o7 for vdr 1.7, see the w_scan homepage for options
> > > > > > > > >    and examples:
> > > > > > > > > 
> > > > > > > > > 	http://wirbel.htpc-forum.de/w_scan/index_en.html
> > > > > > > > > 
> > > > > > > > >    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.
> > > > > > > > > 
> > > > > > > > > 5. I ported two webinterfaces because I only learned about vdr-live
> > > > > > > > >    later which seems to be faster and uses fewer resources meaning you
> > > > > > > > >    could probably turn a pretty wimpy box into a vdr server as long as
> > > > > > > > >    you keep the actual watching (especially of h264 hd) to a faster box
> > > > > > > > >    connected over the network.  The vdr-plugin-live webinterface by
> > > > > > > > >    default listens on port 8008:
> > > > > > > > > 
> > > > > > > > > 	http://127.1:8008/
> > > > > > > > > 
> > > > > > > > >    and vdradmin_am listens on 8001:
> > > > > > > > > 
> > > > > > > > > 	http://127.1:8001/
> > > > > > > > > 
> > > > > > > > >    And the streamdev plugin has a (simple) webinterface too if you point
> > > > > > > > >    a browser at it: (instead of a player)
> > > > > > > > > 
> > > > > > > > > 	http://127.1:3000/
> > > > > > > > > 
> > > > > > > > > 6. I may have forgot some other manual installation steps, if you
> > > > > > > > >    notice something just post a followup...  Most of vdr's own
> > > > > > > > >    configuration including plugins should be available in the osd
> > > > > > > > >    under `Setup'.
> > > > > > > > > 
> > > > > > > > >  And finally, here are some links about vdr and the plugins and
> > > > > > > > > webinterfaces I made ports for:
> > > > > > > > > 
> > > > > > > > > 0. vdr 1.7.14:
> > > > > > > > > 	http://www.tvdr.de/
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Main_Page
> > > > > > > > > 
> > > > > > > > > 1. xineliboutput-1.0.5 cvs snapshot from 20100414:
> > > > > > > > > 	http://sourceforge.net/projects/xineliboutput/
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Xineliboutput-plugin
> > > > > > > > > 
> > > > > > > > > 2. streamdev-0.5.0 cvs snapshot from 20100426:
> > > > > > > > > 	http://streamdev.vdr-developer.org/
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Streamdev-plugin
> > > > > > > > > 
> > > > > > > > > 3. live-0.2.0:
> > > > > > > > > 	http://live.vdr-developer.org/
> > > > > > > > > 
> > > > > > > > > 4. live also depends on cxxtools and tntnet which I also had to port:
> > > > > > > > > 	http://www.tntnet.org/cxxtools.html
> > > > > > > > > 	http://www.tntnet.org/index.html
> > > > > > > > > 
> > > > > > > > > 5. epgsearch-0.9.25.beta16:
> > > > > > > > > 	http://winni.vdr-developer.org/epgsearch/index_eng.html
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Epgsearch-plugin
> > > > > > > > > 
> > > > > > > > > 6. femon-1.7.7:
> > > > > > > > > 	http://www.saunalahti.fi/~rahrenbe/vdr/femon/
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Femon-plugin
> > > > > > > > > 
> > > > > > > > > 7. osdpip-0.1.0:
> > > > > > > > > 	http://projects.vdr-developer.org/projects/show/plg-osdpip
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Osdpip-plugin
> > > > > > > > > 
> > > > > > > > > 8. osdteletext-0.8.3:
> > > > > > > > > 	http://projects.vdr-developer.org/projects/show/plg-osdteletext
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Osdteletext-plugin
> > > > > > > > > 
> > > > > > > > > 9. skinenigmang-0.1.1:
> > > > > > > > > 	http://andreas.vdr-developer.org/enigmang/index.html
> > > > > > > > > 	http://www.vdr-wiki.de/wiki/index.php/Skinenigmang-plugin
> > > > > > > > > 	(sorry for de in the second link but at least there are pics...)
> > > > > > > > > 
> > > > > > > > > 10. softdevice 0.5.0 cvs snapshot from 20100414:
> > > > > > > > > 	http://softdevice.berlios.de/
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Softdevice-plugin
> > > > > > > > > 
> > > > > > > > > 10. control-0.0.2a-45yavdr1 with ubuntu yavdr patches:
> > > > > > > > > 	http://ricomp.de/vdr/down_en.html
> > > > > > > > > 	http://www.linuxtv.org/vdrwiki/index.php/Control-plugin
> > > > > > > > > 
> > > > > > > > > 11. vdradmin_am-3.6.7:
> > > > > > > > > 	http://andreas.vdr-developer.org/vdradmin-am/
> > > > > > > > 
> > > > > > > > Ok I now found out why xineliboutput didn't want to play h264 at all:
> > > > > > > > the libxine port builds with an internal copy of ffmpeg by default,
> > > > > > > > turning on its 'Enable external FFMpeg' knob got it playing.  Its still
> > > > > > > > skipping once in a while, maybe using the new ffmpeg-devel port will
> > > > > > > > fix that, but looks like that would involve rebuilding several
> > > > > > > > dependencies at least so I haven't yet tried.
> > > > > > > > 
> > > > > > > >  While testing that, I have also added a small patch to improve the osd
> > > > > > > > resizing so the osd should look a little better now when the video resolution
> > > > > > > > changes (multimedia/vdr-plugin-xineliboutput/files/patch-osdautosize),
> > > > > > > > and I add the keypad return key to the vdr-sxfe remote.conf and changed
> > > > > > > > FastFwd from f to w because f is already in use for the fullscreen toggle
> > > > > > > > with vdr-sxfe --hotkeys.
> > > > > > > 
> > > > > > > Updated version with a new osd autosize patch that handles width < 512
> > > > > > > after I found out there are sd channels with width = 480 at least...
> > > > > > 
> > > > > > New version that takes care of OSTYPE being now defined (which caused
> > > > > > the FreeBSD host detection in jpulz' patches to fail and the vdr and
> > > > > > plugin port builds to abort), and that adds a missing www/p5-libwww
> > > > > > dependency in the vdradmin-am port.
> > > > > 
> > > > > Good news:  with the ffmpeg-devel port and updated ports watching h264
> > > > > hd streams via xineliboutput (vdr-sxfe/xine/kaffeine) and xv on
> > > > > xf86-video-ati-6.13.0 works well now, only enabling deinterlacing with
> > > > > 1080i still sometimes causes skipping with kaffeine.  Another issue I
> > > > > initially had was vdr-sxfe often used 100% cpu on sd(!) channels, but
> > > > > turned out that that was just caused by it now defaulting to using
> > > > > libasound (alsa) that I installed for chrome, passing --audio=oss
> > > > > to vdr-sxfe fixed that.
> > > > > 
> > > > >  ..and I also updated the shar again, this time its mostly plist/permission
> > > > > fixes, and reinstalling the vdrdevel port via portmaster/portupgrade was
> > > > > broken too.
> > > > 
> > > > And now I also found a `fix' for vdr-sxfe resetting the mixer volume to
> > > > 45 at start when using software volume control, added that to the shar
> > > > as multimedia/vdr-plugin-xineliboutput/files/patch-swvol (so you'll need
> > > > to reinstall the vdr-plugin-xineliboutput port.)
> > > > 
> > > >  Btw I use software volume control in vdr because selecting
> > > > `hardware' volume control 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
> > > 
> > > That patch has been committed upstream now, so I took the opportunity
> > > to update the vdr-plugin-xineliboutput port to latest cvs; and I also
> > > made the previous osd size patch (follow native stream resolution)
> > > a seperate option in the xineliboutput osd config
> > > (multimedia/vdr-plugin-xineliboutput/files/patch-osdstreamsize),
> > > so `auto' is now back to what it did previously.  And you can get the
> > > new distfile from here while the mirrors have not updated yet:
> > > 
> > > 	http://people.freebsd.org/~nox/tmp/distfiles/vdr-xineliboutput-1.0.5s20100520.tar.bz2
> > 
> > Now finally updated to vdr 1.7.15, thanx jpulz for the patch!
> > (I didn't use all of it for now tho, will have to properly take care
> > of non-default PREFIX/LOCALBASE later.)
> 
> Got some feedback (hi lme!) so I updated the shar again:
> 
> 1. Updated epgsearch plugin to latest version and fixed build on i386.
>    (see multimedia/vdr-plugin-epgsearch/files/patch-menu_whatson.c)
> 
> 2. Fixed www/vdradmin-am config for new vdr port 6419, fixed file
>    permissions and made it create missing dirs below /var, now it
>    also can run as the vdr user and not just as root.  (Still no rc.d
>    script yet tho.)
> 
> 3. Small plist fix for multimedia/vdrdevel itself.
> 
> 4. Fixed fetch for streamdev and xineliboutput plugins.  (Tho that
>    actually were earlier updates.)

Next round of updates:

1. Someone on irc asked about the infosatepg plugin for Astra 19.2E
   so I wanted to try it and ported it to FreeBSD,

	http://vdr-wiki.de/wiki/index.php/Infosatepg-plugin

   (multimedia/vdr-plugin-infosatepg in the shar with quite a few
   patches, sorry about the german link but the epg data this plugin
   reads is for german channels anyway...)

   Since it wasn't immediately obvious here is how I got it receiving
   and using the infosat epg data quickly:

   a) Make sure vdr gets started with:

	-P"infosatepg -d /var/cache/vdr-infosatepg"

      (added to the other args, the port will create that dir but
      I didn't change the plugin's internal default yet.)

   b) In the osd go to Setup -> Plugins -> infosatepg, make sure it
      found its channel ("Using channel" is not "none"), zap to that
      channel.

   c) Check data is coming in using:

	svdrpsend.pl plug infosatepg stat

      from a shell, wait until all seven days are `Received 100%'
      (should take maybe around 10 minutes, after that you can tune
      to another channel again.)

   d) In the osd go in the plugin setup again and configure the channels
      you want the received infosat epg data to be used/merged for
      (most/all will be off in the beginning), then leave the setup
      and for good measure do:

	svdrpsend.pl plug infosatepg save

      to make sure the settings are saved.

   e) Now you can do:

	svdrpsend.pl plug infosatepg repr

      to force the data to be processed again so it gets merged
      into vdr's epg for the channels you just configured.  And
      after that was finished I had to restart vdr too to get
      at least the live plugin to notice Eurosport and GoTV now
      also have epg...

2. In the process noticed vdr wasn't recognizing the ISO8859-15
   codeset when spelled that way in LANG (it only knew ISO-8859-x
   with a hyphen after the ISO, and infosatepg defaulted to assume
   the system was always using UTF-8 too) - the first fix is in

	multimedia/vdrdevel/files/patch-z-libsi-si.c

   so you'll have to rebuild the vdrdevel port too.

3. And I made multimedia/vdr-plugin-osdteletext create a dir
   /var/cache/vdr-osdteletext too so you can then use it e.g. with

	"-Posdteletext --directory=/var/cache/vdr-osdteletext --cache-system=packed --max-cache=128"

 Enjoy,
	Juergen

PS: I also made two patches that are not in the shar because they
currently are pretty hacky and also hardcode the changed behaviour:

- Make infosatepg prefer BR-alpha over BR-alpha* (channel has moved),
  ORF2E over ORF2 (the former is FTA), and FTA HDTV versions of
  channels when selecting the channel to merge epg data to (so it
  will currently find the HD versions of arte, Das Erste, and ZDF.)
  That way shows will be marked HDTV in the epg of those channels
  where they actually are HD. :)

	http://people.freebsd.org/~nox/dvb/patch-vdr-infosatepg-altchannel.txt

  The patch can go in the multimedia/vdr-plugin-infosatepg/files
  dir, and you can selectively disable parts of it by changing
  "#if 1"s to "#if 0".

- And something completely different:  make vdr timers also record
  teletext; this came up on irc too and is mostly useful for subtitles
  transmitted that way - the osdteletext plugin doesnt seem to
  display them on playback but you can point e.g. vlc at the recorded
  .ts file below /video and click on the teletext icon in the bottom
  left - or use projectx to process subtitles including turning
  them into .sub files or just remux the .ts to make projectx add
  subtitle pagenumbers and correct(?) the teletext language because
  neither that nor the pmt pid are currently in the channels.conf
  so the patch just `guesses' by simply using the language of the
  first audio track.  vlc at least doesn't seem to care much tho,
  it still displayed TV Polonia's teletext the same even when forcing
  the teletext language in the recorded pmt to german.  And fwiw,
  osdteletext didn't want to display the teletext of neither
  TV Polonia nor of the french versions of arte (maybe because of
  different encoding?), and vlc pointed at TV Polonia via streamdev
  got a wrong teletext start page.  (164 instead of 100, for some
  reason dvbsnoop -pd 9 -s ts -tssubdecode -if ... didn't want to
  decode the pmt of a streamdev recording from there...)

	http://people.freebsd.org/~nox/dvb/patch-vdr-1.7.15-record-teletext.txt

  And that patch can go in the multimedia/vdrdevel/files dir.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100710164631.GA6687>