1352
1448
default value of 25, then one of the <option> tags must also
1353
1449
list this value.
1355
* <storage driver="...">
1359
Specifies the storage driver, currently sqlite3 and mysql are supported.
1360
Each storage driver has it's own configuration parameters.
1455
Defines the storage section - database selection is done here. Currently
1456
sqlite3 and mysql are supported. Each storage driver has it's own
1457
configuration parameters.
1459
o <sqlite enabled="yes>
1461
Required if MySQL is not defined
1370
1463
Allowed values are "sqlite3" or "mysql", the available options depend
1371
1464
on the selected driver.
1375
There is only one child tag for sqlite:
1377
* <database-file>mediatomb.db</database-file>
1381
Default: mediatomb.db
1383
The database location is relative to the server's home, if the
1384
sqlite database does not exist it will be created
1389
Below are the child tags for MySQL:
1391
* <host>localhost</host>
1395
Default: "localhost"
1397
This specifies the host where your MySQL database is running.
1405
This specifies the port where your MySQL database is
1408
o <username>root</username>
1412
Default: "mediatomb"
1414
This option sets the user name that will be used to connect
1417
o <password></password>
1421
Default: no password
1423
Defines the password for the MySQL user. If the tag doesn't
1424
exist MediaTomb will use no password, if the tag exists,
1425
but is empty MediaTomb will use an empty password. MySQL
1426
has a distinction between no password and an empty
1429
o <database>mediatomb</database>
1433
Default: "mediatomb"
1435
Name of the database that will be used by MediaTomb.
1472
Below are the sqlite driver options:
1474
- <database-file>mediatomb.db</database-file>
1478
Default: mediatomb.db
1480
The database location is relative to the server's home, if the
1481
sqlite database does not exist it will be created automatically.
1483
- <synchronous>off</synchronous>
1489
Possible values are "off", "normal" and "full".
1491
This option sets the SQLite pragma "synchronous". This setting will
1492
affect the performance of the database write operations. For more
1493
information about this option see the SQLite documentation: http://
1494
www.sqlite.org/pragma.html#pragma_synchronous
1496
- <on-error>restore</on-error>
1502
Possible values are "restore" and "fail".
1504
This option tells MediaTomb what to do if an SQLite error occurs
1505
(no database or a corrupt database). If it is set to "restore" it
1506
will try to restore the database from a backup file (if one exists)
1507
or try to recreate a new database from scratch.
1509
If the option is set to "fail", MediaTomb will abort on an SQLite
1512
- <backup enabled="no" interval="6000"/>
1524
Enables or disables database backup.
1532
Defines the backup interval in seconds.
1534
o <mysql enabled="no"/>
1536
Defines the MySQL storage driver section.
1544
Enables or disables the MySQL driver.
1546
Below are the child tags for MySQL:
1548
- <host>localhost</host>
1552
Default: "localhost"
1554
This specifies the host where your MySQL database is running.
1562
This specifies the port where your MySQL database is running.
1564
- <username>root</username>
1568
Default: "mediatomb"
1570
This option sets the user name that will be used to connect to the
1573
- <password></password>
1577
Default: no password
1579
Defines the password for the MySQL user. If the tag doesn't exist
1580
MediaTomb will use no password, if the tag exists, but is empty
1581
MediaTomb will use an empty password. MySQL has a distinction
1582
between no password and an empty password.
1584
- <database>mediatomb</database>
1588
Default: "mediatomb"
1590
Name of the database that will be used by MediaTomb.
1437
1592
6.2. Import Settings
1480
1635
Same as above, but defines the charset of the metadata (i.e. id3 tags, Exif
1481
1636
information, etc.)
1483
* <virtual-layout type="builtin">
1638
* <scripting script-charset="UTF-8">
1487
Defines options for the virtual container layout; the so called "virtual
1488
container layout" is the way how the server organizes the media according
1489
to the extracted metadata. For example, it allows sorting audio files by
1490
Album, Artist, Year and so on.
1498
Specifies what will be used to create the virtual layout, possible
1501
- builtin: a default layout will be created by the server
1503
- js: a user customizable javascript will be used (MediaTomb must be
1504
compiled with js support)
1506
- disabled: only PC-Directory structure will be created, i.e. no
1509
o <script charset="UTF-8">/path/to/my/import/script.js</script>
1511
Required if virtual layout type is "js"
1513
Default: ${prefix}/share/mediatomb/js/import.js, where ${prefix} is
1514
your installation prefix directory.
1516
Points to the script invoked upon media import. For more details read
1517
doc/scripting-intro.txt
1527
Specifies the import script encoding.
1642
Defines the scripting section.
1644
o script-charset=...
1650
Below are the available scripting options:
1652
o <virtual-layout type="builtin">
1656
Defines options for the virtual container layout; the so called
1657
"virtual container layout" is the way how the server organizes the
1658
media according to the extracted metadata. For example, it allows
1659
sorting audio files by Album, Artist, Year and so on.
1667
Specifies what will be used to create the virtual layout, possible
1670
* builtin: a default layout will be created by the server
1672
* js: a user customizable javascript will be used (MediaTomb must
1673
be compiled with js support)
1675
* disabled: only PC-Directory structure will be created, i.e. no
1678
The virtual layout can be adjusted using an import script which is
1681
- <import-script>/path/to/my/import-script.js</script>
1683
Required if virtual layout type is "js"
1685
Default: ${prefix}/share/mediatomb/js/import.js, where ${prefix} is
1686
your installation prefix directory.
1688
Points to the script invoked upon media import. For more details
1689
read doc/scripting.txt
1691
o <common-script>/path/to/my/common-script.js</common-script>
1695
Default: ${prefix}/share/mediatomb/js/common.js, where ${prefix} is
1696
your installation prefix directory.
1698
Points to the so called common script - think of it as a custom library
1699
of js helper functions, functions added there can be used in your
1700
import and in your playlist scripts. For more details read doc/
1703
o <playlist-script create-link="yes">/path/to/my/playlist-script.js</playlist-script>
1707
Default: ${prefix}/share/mediatomb/js/playlists.js, where ${prefix} is
1708
your installation prefix directory.
1710
Points to the script that is parsing various playlists, by default
1711
parsing of pls and m3u playlists is implemented, however the script can
1712
be adapted to parse almost any kind of text based playlist. For more
1713
details read doc/scripting.txt
1721
Links the playlist to the virtual container which contains the
1722
expanded playlist items. This means, that if the actual playlist
1723
file is removed from the database, the virtual container
1724
corresponding to the playlist will also be removed.
1529
1726
* <magic-file>/path/to/my/magic-file</magic-file>
1830
2118
given keyword, it will be added to auxdata. You can then use
1831
2119
that data in your import scripts.
2121
6.2.1. Online Content Settings
2123
This section resides under import and defines options for various supported
2126
<online-content fetch-buffer-size="262144" fetch-buffer-fill-size="0">
2130
This tag defines the online content section.
2134
* fetch-buffer-size=...
2140
Often, online content can be directly accessed by the player - we will just
2141
give it the URL. However, sometimes it may be necessary to proxy the
2142
content through MediaTomb. This setting defines the buffer size in bytes,
2143
that will be used when fetching content from the web. The value must not be
2144
less than allowed by the curl library (usually 16384 bytes).
2146
* fetch-buffer-fill-size=...
2150
Default: 0 (disabled)
2152
This setting allows to prebuffer a certain amount of data, given in bytes,
2153
before sending it to the player, this should ensure a constant data flow in
2154
case of slow connections. Usually this setting is not needed, because most
2155
players will anyway have some kind of buffering, however if the connection
2156
is particularly slow you may want to try enable this setting.
2158
Below are the settings for supported services.
2160
6.3. Transcoding Settings
2162
The transcoding section allows to define ways on how to transcode content.
2164
<transcoding enabled="yes" fetch-buffer-size="262144" fetch-buffer-fill-size="0">
2168
This tag defines the transcoding section.
2178
This attribute defines if transcoding is enabled as a whole, possible
2179
values are "yes" or "no".
2181
* fetch-buffer-size=...
2187
In case you have transcoders that can not handle online content directly
2188
(see the accept-url parameter below), it is possible to put the transcoder
2189
between two FIFOs, in this case MediaTomb will fetch the online content.
2190
This setting defines the buffer size in bytes, that will be used when
2191
fetching content from the web. The value must not be less than allowed by
2192
the curl library (usually 16384 bytes).
2194
* fetch-buffer-fill-size=...
2198
Default: 0 (disabled)
2200
This setting allows to prebuffer a certain amount of data before sending it
2201
to the transcoder, this should ensure a constant data flow in case of slow
2202
connections. Usually this setting is not needed, because most transcoders
2203
will just patiently wait for data and we anyway buffer on the output end.
2204
However, we observed that ffmpeg will fail to transcode flv files if it
2205
encounters buffer underruns - this setting helps to avoid this situation.
2209
* <mimetype-profile-mappings>
2211
The mime type to profile mappings define which mime type is handled by
2214
Different mime types can map to the same profile in case that the
2215
transcoder in use supports various input formats. The same mime type can
2216
also map to several profiles, in this case multiple resources in the XML
2217
will be generated, allowing the player to decide which one to take.
2219
The mappings under mimetype-profile are defined in the following manner:
2221
o <transcode mimetype="audio/x-flac" using="oggflac-pcm"/>
2225
In this example we want to transcode our flac audio files (they have
2226
the mimetype audio/x-flac) using the "oggflac-pcm" profile which is
2231
Selects the mime type of the source media that should be
2236
Selects the transcoding profile that will handle the mime type
2237
above. Information on how to define transcoding profiles can be
2242
This section defines the various transcoding profiles.
2244
o <profile name="oggflag-pcm" enabled="yes" type="external">
2248
Definition of a transcoding profile.
2254
Name of the transcoding profile, this is the name that is specified
2255
in the mime type to profile mappings.
2261
Enables or disables the profile, allowed values are "yes" or "no".
2267
Defines the profile type, currently only "external" is supported,
2268
this will change in the future.
2270
* <mimetype>audio/x-wav</mimetype>
2274
Defines the mime type of the transcoding result (i.e. of the
2275
transcoded stream). In the above example we transcode to PCM.
2277
* <accept-url>yes</accept-url>
2283
Some transcoders are able to handle non local content, i.e.
2284
instead giving a local file name you can pass an URL to the
2285
transcoder. However, some transcoders can only deal with local
2286
files, for this case set the value to "no".
2288
* <first-resource>no</first-resource>
2294
It is possible to offer more than one resource in the browse
2295
result, a good player implementation will go through all
2296
resources and pick the one that it can handle best.
2297
Unfortunately most players only look at the first resource and
2298
ignore the rest. When you add a transcoding profile for a
2299
particular media type it will show up as an additional resource
2300
in the browse result, using this parameter you can make sure
2301
that the transcoded resource appears first in the list.
2305
if more than one transcoding profile is applied on one
2306
source media type (i.e. you transcode an OGG file to MP3
2307
and to PCM), and the first-resource parameter is specified
2308
in both profiles, then the resource positions are
2311
* <hide-original-resource>no</hide-original-resource>
2317
This parameter will hide the resource of the original media
2318
when sending the browse result to the player, this can be
2319
useful if your device gets confused by multiple resources and
2320
allows you to send only the transcoded one.
2322
* <accept-ogg-theora>no</accept-org-theora>
2328
As you may know, OGG is just a container, the content could be
2329
Vorbis or Theora while the mime type is "application/ogg". For
2330
transcoding we need to identify if we are dealing with audio or
2331
video content, specifying yes in this tag in the profile will
2332
make sure that only OGG files containing Theora will be
2335
* <avi-fourcc-list mode="ignore">
2341
This option allows to specify a particular list of AVI fourcc
2342
strings that can be either set to be ignored or processed by
2347
this option has no effect on non AVI content.
2353
Specifies how the list should be handled by the transcoding
2354
engine, possible values are:
2358
The option is completely disabled, fourcc list is not
2363
Only the fourcc strings that are listed will be
2364
processed by the transcoding profile, AVI files with
2365
other fourcc strings will be ignored. Setting this is
2366
useful if you want to transcode only some specific
2367
fourcc's and not transcode the rest.
2371
The fourcc strings listed will not be transcoded, all
2372
other codecs will be transcoded. Setting this might be
2373
useful if you want to prevent a limited number of
2374
codecs from being transcoded, but want to apply
2375
transcoding on the rest (i.e. - do not transcode divx
2376
and xvid, but want to transcode mjpg and whatever else
2377
might be in the AVI container).
2379
The list of fourcc strings is enclosed in the avi-fourcc-list
2382
o <fourcc>XVID</fourcc>
2383
<fourcc>DX50</fourcc>
2387
* <agent command="ogg123" arguments="-d wav -f %out %in/>
2391
Defines the transcoding agent and the parameters, in the
2392
example above we use ogg123 to convert ogg or flac to wav.
2398
Defines the transcoder binary that will be executed by
2399
MediaTomb upon a transcode request, the binary must be in
2400
$PATH. It is very important that the transcoder is capable
2401
of writing the output to a FIFO, some applications, for
2402
example ffmpeg, have problems with that. The command line
2403
arguments are specified separately (see below).
2409
Specifies the command line arguments that will be given to
2410
the transcoder application upon execution. There are two
2416
Those tokens get substituted by the input file name and the
2417
output FIFO name before execution.
2419
* <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
2423
These settings help you to achieve a smooth playback of
2424
transcoded media. The actual values need to be tuned and depend
2425
on the speed of your system. The general idea is to buffer the
2426
data before sending it out to the player, it is also possible
2427
to delay first playback until the buffer is filled to a certain
2428
amount. The prefill should give you enough space to overcome
2429
some high bitrate scenes in case your system can not transcode
2436
Size of the buffer in bytes.
2442
Size of chunks in bytes, that are read by the buffer from
2443
the transcoder. Smaller chunks will produce a more constant
2444
buffer fill ratio, however too small chunks may slow things
2451
Initial fill size - number of bytes that have to be in the
2452
buffer before the first read (i.e. before sending the data
2453
to the player for the first time). Set this to 0 (zero) if
2454
you want to disable prefilling.
2456
* <resolution>320x240</resolution>
2460
Allows you to tell the resolution of the transcoded media to
2461
your player. This may be helpful if you want to generate
2462
thumbnails for your photos, or if your player has the ability
2463
to pick video streams in a particular resolution. Of course the
2464
setting should match the real resolution of the transcoded
2467
* <thumbnail>yes</thumbnail>
2473
this is an experimental option, the implementation will be
2474
refined in the future releases.
2476
This is a special option which was added for the PS3 users. If
2477
the resolution option (see above) was set, then, depending on
2478
the resolution an special DLNA tag will be added, marking the
2479
resource as a thumbnail. This is useful if you have a
2480
transcoding script that extracts an image out of the video and
2481
presents it as a thumbnail.
2483
Use the option with caution, no extra checking is being done if
2484
the resulting mimetype represents an image, also, it is will
2485
only work if the output of the profile is a JPG image.
1833
2487
7. Supported Devices
1835
2489
Attention Hardware Manufacturers: