Table of Contents
In WACS 1.0.1 we have continued to develop the media asset manipulation
tools. When originally introduced in WACS 0.9.2 the new functionality which
covered the manipulation of media assets, primarily video clips was based on
a basic set of built-in preset values. This functionality was provided
through a number of API calls held within the WacsId
module. One of these is called media_settings
and this
returns configuration information used in many of the media operations. It
was always the intention that this call would be updated to read those settings
from a configuration file. This has now become a reality.
Initially the main aspect controlled by
media_settings
is the automatic generation of thumbnails
for video files while they are being unpacked and placed using the colleciton
management tools. It is envisaged that the naming of aspect ratios and
resolutions will also be controlled from media_settings
in the near future. These settings are all controlled by a file in the
standard WACS configuration location, typically /etc/wacs.d
called settings.xml. A utility program is provided in the
migrate directory called wacssettingsout which exports the
as-parsed settings file to a new file called wacs_settings.xml
in the current directory.
The Settings Configuration file, settings.xml contains a number of sections. The first one we will be looking at is the media_settings section. Within this we have a number of directives relating to the automatic creation of thumbnails for a video clip.
Withing the media_settings section we have a number of entries named thumbs. Each of these specify how to create thumbnails of a video and each has a specified range to which it applies, which is specified in terms of the duration of the overall video clip. Let us start by looking at a very simple thumbnailing rule, that for video clips of less than one minute in duration:
<thumbs> <desc%gt;Less than 1 minute</desc> <max>59</max> <min>0</min> <number>1</number> <pos> <start>0.5</start> <tail>-50pct</tail> </pos> </thumbs>
The first field here (desc) describes what this one does. The next two fields (min and max) specify that this rule applies from durations of zero to fifty-nine seconds. number specifies howmany final thumbnails will be produced by this rule - remember that several different choices are offered for each thumbnail and the person administering the collection with be offered the choice between them as to which will be used in the final version.
The next section pos relates to the position from
which this thumbnails will be taken. This is given as a decimal value between
0 and 1, so 0.5 in this example is exactly half-way through the clip, ie 50%
of the way through. Typically five thumbnails will be created at approximately
3 second intervals, so in a 58 second clip these will be 29 seconds in, 32
seconds in, 35 seconds in and so on. That is starting from the 50% position
and sampling every few seconds beyond that point. The resulting thumbnail
will be named for the video clip with -50pct appended to it. So the final
thumbnails will be MyVideoClip-50pct.jpg and so on. A three thumbnail rule
might produce MyVideoClip-25pct.jpg
,
MyVideoClip-50pct.jpg
and MyVideoClip-75pct.jpg
.
In future releases we intend to add extra features to the media
settings in settings.xml
- these should include features
like hover over short clips, and automatic creation of standardised alternate
versions such as those that meet the requirements for streaming extensions
to your webserver. Watch the release notes of future versions for these
features to be added. You may also be able to obtain early access to these
features by downloading the developement version from
wacsip.sourceforge.net.