nathan@0
|
1 |
|
nathan@0
|
2 |
This is a dual-plugin for VDR.
|
nathan@0
|
3 |
The "MP3-Plugin" allows playback of MP3 and other audio files.
|
nathan@0
|
4 |
The "MPlayer-Plugin" is used to call MPlayer for playback of video
|
nathan@0
|
5 |
files (e.g. DivX)
|
nathan@0
|
6 |
|
nathan@0
|
7 |
Written by: Stefan Hülswitt <s.huelswitt@gmx.de>
|
nathan@0
|
8 |
Project's homepage: http://www.muempf.de/
|
nathan@0
|
9 |
Latest version available at: http://www.muempf.de/down/
|
nathan@0
|
10 |
|
nathan@0
|
11 |
See the file COPYING for license information.
|
nathan@0
|
12 |
|
nathan@0
|
13 |
----------------------------------------------------------------------
|
nathan@0
|
14 |
|
nathan@0
|
15 |
For the user manual see the MANUAL file.
|
nathan@0
|
16 |
|
nathan@0
|
17 |
|
nathan@0
|
18 |
Installing:
|
nathan@0
|
19 |
-----------
|
nathan@0
|
20 |
|
nathan@0
|
21 |
By default the Makefile builds both plugins. If you want to use only one of
|
nathan@0
|
22 |
them, you can add one of "WITHOUT_MP3=1" or "WITHOUT_MPLAYER=1" to your
|
nathan@0
|
23 |
Make.config.
|
nathan@0
|
24 |
|
nathan@0
|
25 |
In the past month the plugins only have been tested with VDR 1.4.x and 1.5.x.
|
nathan@0
|
26 |
While the plugins probably can be compiled with VDR down to version 1.1.29, this
|
nathan@0
|
27 |
is not tested nor supported.
|
nathan@0
|
28 |
|
nathan@0
|
29 |
By default any mentioned plugin config file should be located in the "plugins"
|
nathan@0
|
30 |
subdirectory of your VDR config directory (see commandline option -S to specify
|
nathan@0
|
31 |
an plugin specific subdirectory). For a complete description of the config
|
nathan@0
|
32 |
files, see the MANUAL file.
|
nathan@0
|
33 |
|
nathan@0
|
34 |
The MP3 plugin needs some external libraries (some optionally):
|
nathan@0
|
35 |
|
nathan@0
|
36 |
You must have installed libmad and libid3tag from
|
nathan@0
|
37 |
<http://www.underbit.com/products/mad/> for decoding MP3 and ID3 support.
|
nathan@0
|
38 |
Recommended version is 0.15.1b. To compile and install I suggest the following
|
nathan@0
|
39 |
sequence from the source directory (libmad and libid3tag are installed
|
nathan@0
|
40 |
separately, so you must execute this once for each directory):
|
nathan@0
|
41 |
|
nathan@0
|
42 |
> configure
|
nathan@0
|
43 |
> make
|
nathan@0
|
44 |
> make install
|
nathan@0
|
45 |
> ldconfig
|
nathan@0
|
46 |
|
nathan@0
|
47 |
For playback of WAV and other sound files you must have installed libsndfile
|
nathan@0
|
48 |
<http://www.mega-nerd.com/libsndfile/> on your system. Recommended version is
|
nathan@0
|
49 |
1.0.11 or newer. The old 0.0.x series doesn't work due to some API changes. To
|
nathan@0
|
50 |
compile and install libsndfile I suggest the following sequence from the
|
nathan@0
|
51 |
libsndfile source directory:
|
nathan@0
|
52 |
|
nathan@0
|
53 |
> configure
|
nathan@0
|
54 |
> make
|
nathan@0
|
55 |
> make install
|
nathan@0
|
56 |
> ldconfig
|
nathan@0
|
57 |
|
nathan@0
|
58 |
If you don't want to install libsndfile, you must add "WITHOUT_LIBSNDFILE=1" to
|
nathan@0
|
59 |
your Make.config.
|
nathan@0
|
60 |
|
nathan@0
|
61 |
If you want to listen to CD audio, you can use cdfs
|
nathan@0
|
62 |
<http://www.elis.rug.ac.be/~ronsse/cdfs/> (version 0.5c suggested). I suggest
|
nathan@0
|
63 |
that you create a new entry in /etc/fstab and mp3sources.conf for cdfs. The
|
nathan@0
|
64 |
/etc/fstab entry could look like:
|
nathan@0
|
65 |
/dev/hdc /mnt/cdfs cdfs ro,noauto,user 0 0
|
nathan@0
|
66 |
The entry for mp3sources.conf could look like:
|
nathan@0
|
67 |
/mnt/cdfs;CD-Audio;1
|
nathan@0
|
68 |
Or if you want only WAV files to be displayed:
|
nathan@0
|
69 |
/mnt/cdfs;CD-Audio;1;*.wav
|
nathan@0
|
70 |
If you don't like cdfs, you could use any other filesystems which allows to
|
nathan@0
|
71 |
access the CD audio data as WAV files.
|
nathan@0
|
72 |
|
nathan@0
|
73 |
For playback of OGG files you must have installed libvorbis and libvorbisfile
|
nathan@0
|
74 |
<http://www.xiph.org/ogg/vorbis/> on your system. Most Linux distributions
|
nathan@0
|
75 |
include packages for this.
|
nathan@0
|
76 |
If you don't want to install the vorbis libraries, you must add
|
nathan@0
|
77 |
"WITHOUT_LIBVORBISFILE=1" to your Make.config.
|
nathan@0
|
78 |
|
nathan@0
|
79 |
The MP3 plugin can output the sound to an OSS soundcard. To compile this
|
nathan@0
|
80 |
support add "WITH_OSS_OUTPUT=1" to your Make.config. The output device defaults
|
nathan@0
|
81 |
to "/dev/dsp" (see commandline option -D too). Don't forget to enable OSS
|
nathan@0
|
82 |
output in the plugin setup menu.
|
nathan@0
|
83 |
|
nathan@0
|
84 |
Before compiling the plugin, you could have a look at "mp3-config.h". This file
|
nathan@0
|
85 |
includes a number of defines to set options and values at compile time. You
|
nathan@0
|
86 |
should only change defines, if you have understand the source code parts which
|
nathan@0
|
87 |
deal with the define. Improper settings can make the MP3 plugin to fail or to
|
nathan@0
|
88 |
operate unsmoothly. So you should know what you are doing.
|
nathan@0
|
89 |
|
nathan@0
|
90 |
To build the plugin(s) type:
|
nathan@0
|
91 |
"make plugins"
|
nathan@0
|
92 |
from the VDR source directory.
|
nathan@0
|
93 |
|
nathan@0
|
94 |
To make the progressbar work with the MPlayer plugin and slave mode you need to
|
nathan@0
|
95 |
apply a small patch to mplayer. Select an appropriate patch file for your
|
nathan@0
|
96 |
MPlayer version from the patches subdirectory. Apply the patch and recompile
|
nathan@0
|
97 |
MPlayer.
|
nathan@0
|
98 |
|
nathan@0
|
99 |
Early 0.90rc versions of MPlayer need a patch to enabled HEAD driver support
|
nathan@0
|
100 |
too. You will find one for 0.90rc1 in the patches subdirectory. Probably you'll
|
nathan@0
|
101 |
have to point configure to the new DVB include files with
|
nathan@0
|
102 |
--with-extraincdir=/usr/local/src/DVB/include or where ever you have stored the
|
nathan@0
|
103 |
files. MPlayer versions later as 0.90rc5 allow to select HEAD support with a
|
nathan@0
|
104 |
configure option or even detect this automatically.
|
nathan@0
|
105 |
|
nathan@0
|
106 |
Commandline options:
|
nathan@0
|
107 |
--------------------
|
nathan@0
|
108 |
|
nathan@0
|
109 |
For both plugins it's possible to give an additional configuration subdirectory
|
nathan@0
|
110 |
with commandline option -S/--sources, i.e. the given directory name is appended
|
nathan@0
|
111 |
to the default plugin config directory path.
|
nathan@0
|
112 |
|
nathan@0
|
113 |
Both plugins have a commandline option -m/--mount to define the name and
|
nathan@0
|
114 |
location of the mount script. The default mount script is "mount.sh". This
|
nathan@0
|
115 |
script is called from the plugin with 2 options on the commandline. The first
|
nathan@0
|
116 |
is one of mount/unmount/eject/status and gives the action to perform. The
|
nathan@0
|
117 |
second one is the base directory as defined in "mp3sources.conf" or
|
nathan@0
|
118 |
"mplayersources.conf". The script must return the exit code 0 if the action was
|
nathan@0
|
119 |
successful and 1 if the action failed (see the comments in the example
|
nathan@0
|
120 |
"mount.sh" script which comes with the archive).
|
nathan@0
|
121 |
|
nathan@0
|
122 |
The MP3 plugin maintains a cache for information scanned from song files (e.g.
|
nathan@0
|
123 |
ID3 tags). This information is saved to the id3info.cache file by default
|
nathan@0
|
124 |
located in the video directory. You can use commandline option -C/--cache to
|
nathan@0
|
125 |
specify a different directory for this file.
|
nathan@0
|
126 |
|
nathan@0
|
127 |
If you are using cdfs, the MP3 plugin is able to query a CDDB database for the
|
nathan@0
|
128 |
song information (like title, artist). Local CDDB lookups can be enable from
|
nathan@0
|
129 |
the setup menu and you must give the path to your local CDDB files with
|
nathan@0
|
130 |
commandline option -B/--cddb. The database layout follows the xmcd standard
|
nathan@0
|
131 |
(one subdirectory level for the categories, individual files for every disc).
|
nathan@0
|
132 |
The settings for remote CDDB lookups can be found in the setup menu, too. Any
|
nathan@0
|
133 |
information retrieved from a remote host is stored to your local CDDB database,
|
nathan@0
|
134 |
so the user running VDR needs write access to this directory.
|
nathan@0
|
135 |
|
nathan@0
|
136 |
If you are using any of the networking capabilities and you have a dial-up
|
nathan@0
|
137 |
network, you can use the commandline option -n/--network to give a script name.
|
nathan@0
|
138 |
This script is called before and after any network access and receives one
|
nathan@0
|
139 |
option on commandline. This can either be "up" or "down", depending on if it's
|
nathan@0
|
140 |
before or after the network access. In the "up" case the script should not
|
nathan@0
|
141 |
return before the network is connected and useable. By default the plugin
|
nathan@0
|
142 |
assumes that network access can be done at any time without prior action.
|
nathan@0
|
143 |
|
nathan@0
|
144 |
If you want to use the OSS output capability but your soundcard device is not
|
nathan@0
|
145 |
"/dev/dsp" (which is the default) you can use the commandline option -D/--dsp
|
nathan@0
|
146 |
to give an alternative soundcard device.
|
nathan@0
|
147 |
|
nathan@0
|
148 |
If you want to use the cover image display, you have to provide an image
|
nathan@0
|
149 |
converting script. Usually your covers are in a common image format like e.g.
|
nathan@0
|
150 |
JPEG or PNG, but the MP3 plugin can only display MPEG (still) frames. The
|
nathan@0
|
151 |
conversion is done by the script, which takes two arguments: first the filename
|
nathan@0
|
152 |
of the image file and second the filename or the resulting MPEG file. The
|
nathan@0
|
153 |
script also has to take care that any needed subdirectories in the cache are
|
nathan@0
|
154 |
created e.g. mkdir -p. You will find an example script in the examples
|
nathan@0
|
155 |
subdirectory. By default the script is called "image_convert.sh", but you can
|
nathan@0
|
156 |
use the commandline option -i/--iconv to change the name and location of the
|
nathan@0
|
157 |
script.
|
nathan@0
|
158 |
To speed up consecutive accesses to the same image, the converted frames are
|
nathan@0
|
159 |
cached on disk. The default cache directory is "/var/cache/images/mp3". You can
|
nathan@0
|
160 |
change this location with the commandline option -c/--icache.
|
nathan@0
|
161 |
Don't forget to enable the image display in the plugin setup menu.
|
nathan@0
|
162 |
The search order for images is:
|
nathan@0
|
163 |
- An image in the same directory as the song, named like the song but with the
|
nathan@0
|
164 |
song extension replaced with the image format extension
|
nathan@0
|
165 |
e.g. test.mp3 -> test.jpg
|
nathan@0
|
166 |
- An image named "cover" with the image format extension in the same directory
|
nathan@0
|
167 |
as the song (album cover).
|
nathan@0
|
168 |
e.g. cover.gif
|
nathan@0
|
169 |
- An image named "artist" with the image format extension in the parent
|
nathan@0
|
170 |
directory of the song (artist image).
|
nathan@0
|
171 |
e.g. artist.png
|
nathan@0
|
172 |
- An image named "background" with the image format extension in the base
|
nathan@0
|
173 |
directory of the MP3 source.
|
nathan@0
|
174 |
For all locations the extensions "jpg", "png" & "gif" are checked (in that
|
nathan@0
|
175 |
order). If no image can be found, a full screen black image is displayed (this
|
nathan@0
|
176 |
is included statically in the plugin).
|
nathan@0
|
177 |
|
nathan@0
|
178 |
MPlayer is called through a script called "mplayer.sh" with the filename to
|
nathan@0
|
179 |
play as first argument and the phrase SLAVE as second argument if slave mode is
|
nathan@31
|
180 |
enabled. Additional the environment variable DVB_DEVICE will be set with the
|
nathan@31
|
181 |
number of the DVB card which VDR uses as primary display.
|
nathan@31
|
182 |
You can use the commandline option -M/--mplayer to change the name and
|
nathan@0
|
183 |
location of the mplayer script. The script has to call MPlayer with all the
|
nathan@0
|
184 |
necessary options.
|
nathan@0
|
185 |
|
nathan@0
|
186 |
The script should parse the SLAVE keyword too and give appropriate options to
|
nathan@0
|
187 |
MPlayer. To enable slave mode you must give at least the "-slave" option, while
|
nathan@0
|
188 |
I suggest "-slave -nolirc -quiet".
|
nathan@0
|
189 |
|
nathan@0
|
190 |
You can use the mplayer.sh.example file, which comes with the archive, as a
|
nathan@0
|
191 |
starting point. Juri Haberland maintains a full featured mplayer.sh file which
|
nathan@0
|
192 |
is available at <http://batleth.sapienti-sat.org/projects/VDR/>.
|
nathan@0
|
193 |
|
nathan@0
|
194 |
For the MPlayer plugin you can give a location for the global resume file with
|
nathan@0
|
195 |
commandline option -R/--resume.
|
nathan@0
|
196 |
|
nathan@0
|
197 |
|
nathan@0
|
198 |
Summary of commandline options:
|
nathan@0
|
199 |
-------------------------------
|
nathan@0
|
200 |
|
nathan@0
|
201 |
MP3 Plugin:
|
nathan@0
|
202 |
-m CMD, --mount=CMD use CMD to mount/unmount/eject mp3 sources
|
nathan@0
|
203 |
-n CMD, --network=CMD execute CMD before & after network access
|
nathan@0
|
204 |
-B DIR, --cddb=DIR search CDDB files in DIR
|
nathan@0
|
205 |
-C DIR, --cache=DIR store ID3 cache file in DIR
|
nathan@0
|
206 |
-D DIR, --dsp=DIR device for OSS output
|
nathan@0
|
207 |
-i CMD, --iconv=CMD use CMD to convert background images
|
nathan@19
|
208 |
-I IMG, --defimage=IMG use IMG as default background image
|
nathan@0
|
209 |
-c DIR, --icache=DIR cache converted images in DIR
|
nathan@0
|
210 |
-S SUB, --sources=SUB search sources config in SUB subdirectory
|
nathan@0
|
211 |
|
nathan@0
|
212 |
MPlayer plugin:
|
nathan@0
|
213 |
-m CMD, --mount=CMD use CMD to mount/unmount/eject mplayer sources
|
nathan@0
|
214 |
-M CMD, --mplayer=CMD use CMD when calling MPlayer
|
nathan@0
|
215 |
-S SUB, --sources=SUB search sources config in SUB subdirectory
|
nathan@0
|
216 |
-R DIR, --resume=DIR store global resume file in DIR
|