This is a "plugin" for the Video Disk Recorder (VDR).

Written by:                  Antti Ajanki <antti.ajanki@iki.fi>

Project's homepage:          http://users.tkk.fi/~aajanki/vdr/webvideo

Latest version available at: http://users.tkk.fi/~aajanki/vdr/webvideo

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

See the file COPYING for more information.

Description:

Webvideo plugin is a tool for browsing and downloading videos from
popular video sharing websites, such as YouTube and Google video,
using VDR menu interface or a command line client. With the help of
xineliboutput plugin the videos can be played directly without
downloading them first.

The package consists of three components: VDR plugin, a daemon that
transforms webpages into a format understood by the plugin, and a
command line client webvi that can do everything the plugin does but
works without VDR. This file contains information that is required to
use the VDR plugin. For more details about the other two components
see files README.daemon and README.webvi.

Supported video sites:

* Google Video (only videos hosted on YouTube, Google or Metacafe servers)
* Metacafe
* SVT Play (Some videos have very poor quality. A fix for the quality
  problem in libmms is available at
  https://code.launchpad.net/~tonytung/libmms/asf_extended_stream_properties
  but is not included in the libmms 0.4 release.)
* YouTube

Because of the modular design it is possible to add support for new
sites quite easily. See README.daemon for more information.

Requirements:

* VDR 1.6.0 or later
* Python (http://www.python.org/)
* libcurl (http://curl.haxx.se/) and Python binding (http://pycurl.sourceforge.net/)
* libxml and libxslt (http://xmlsoft.org/)
* a video player for viewing the downloaded videos or streaming videos
  without downloading, for example xineliboutput or mplayer plugin

Suggested:

* libmms 0.4 or later (for downloading mms URLs, https://launchpad.net/libmms)

On Debian these dependencies can be satisfied by installing packages
vdr, python-libxml2, python-libxslt1, python-pycurl, python-ctypes,
libmms0 (>= 0.4-1), either vdr-plugin-xineliboutput or
vdr-plugin-mplayer, and their dependencies. For building the Debian
package the developmental packages vdr-dev, libxml2-dev, python-dev,
python-central, debhelper, cdbs, txt2man, gettext, and libglib2.0-dev
are needed, as well.

Installation
------------

These are the general install instructions. If you are using Debian,
it easier to build and install the Debian package as instructed in the
next section.

cd /put/your/path/here/VDR/PLUGINS/src
tar -xzf /put/your/path/here/vdr-webvideo-X.Y.Z.tgz
cd webvideo-X.Y.Z
make
make install
cd ..
ln -s webvideo-X.Y.Z/vdr-plugin webvideo
cd /put/your/path/here/VDR
make
make plugins

Installation on Debian
----------------------

cd /put/your/path/here/VDR/PLUGINS/src
tar -xzf /put/your/path/here/vdr-webvideo-X.Y.Z.tgz
cd webvideo-X.Y.Z
fakeroot debian/rules binary
cd ..
dpkg -i vdr-plugin-webvideo_X.Y.Z-W_i386.deb

Running
-------

The Debian package takes care of setting up the daemon. If you are
using the Debian packge, you can skip this section.

The webvid daemon must be running in the background when the plugin
(or the command line client) is launched. However, the plugin makes an
attempt to automatically start the daemon (if it is setup to connect
to localhost, which is the default) if it can't connect to the daemon.

The plugin can connect to a daemon running on another host. See plugin
command line options -s and -p for specifying the address.

To start the daemon manually run

python /usr/bin/webvid -d -l/tmp/webvid.log

To start the VDR with the webvideo plugin run

./vdr -P webvideo

Usage
-----

Navigation links that lead to a new menu pages are marker with
brackets [ ]. They can be followed by pushing OK.

The links without brackets are video or audio objects. They can be
downloaded in the background by pushing OK. Pressing Blue on a media
object link starts playing it immediately in xineliboutput plugin.
Pressing Info shows more information about a media object.

Keys:

OK      Follow a link, or start downloading a media file
Red     Go back to the previous menu
Green   Go forward in browsing history
Yellow  Show download status screen
Blue    Play media object without downloading
Info    Show details of a media object

In the status screen:

Yellow  Cancel the selected download

VDR plugin command line parameters
----------------------------------

-d dir, --downloaddir=dir  Save downloaded files to dir. The default
                           path is the VDR video directory.
-s server, --server=server Connect to server. Default is localhost.
-p port,   --port=port     Connect to port. Default is 2357.
-c cmd,    --daemoncmd=cmd Command for starting webvid
