My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
OverlayXML  
Overlay configuration XML
Phase-Implementation, Skin, Artwork
Updated Jan 30, 2012 by Stuart.Boston

Introduction

This page describes how to configure the overlay XML configuration file and the properties associated with it.

To enable this feature you should set the following properties:

imagetype.xmlOverlay=true
imagetype.xmlOverlayFile=filename.xml

Instead of skin(-user).properties the overlay settings can be put in overlay.properties (resources folder). It is possible to define a resources folder different to the default one. That can be especially useful for eversion skins. E.g. if overlay XMLs and images are in "/skins/eversion/resources/skin-name":

# skin directory
mjb.skin.dir=./skins/eversion
#set relation of overlay.dir (def:true); true = skin root, false = YAMJ root
mjb.overlay.skinroot=true
# place of overlay xml files and overlay.properties:
mjb.overlay.dir=./resources/skin-name
# place of overlay xml resources (overlay images, default overlay PNGs, dummy images):
mjb.overlay.resources=.

Example 1

Overlay-example.xml

Example 2

Overlay-example_2.xml Overlay-data_2.xml

File format

<overlay>
 <layer>
  <name>ParamName1</name>
  <images>
   <image value="true" filename="image1.png"/>
  </images>
 </layer>
 <layer after="true">
  <name>ParamName2/ParamName3</name>
  <left>-1</left>
  <top>23</top>
  <align>center</align>
  <valign>bottom</valign>
  <images>
   <image name="ParamName2" value="true/true" filename="image2.png"/>
   <image name="ParamName2" value="true/false" filename="image3.png"/>
   <image name="ParamName2" value="false/true" filename="image4.png"/>
   <image name="ParamName3" value="true" filename="image5.png"/>
  </images>
  <positions>
   <position value="true/true" align="right/left"/>
  </positions>
 </layer>
</overlay>

Details

  • <layer> - each overlay layer (required)
    • after - indicates the time when the paint layer: before or after applying the basic overlay (optional, def: false).
  • <name> - parameter name (one - required, more divided slash - optional)
    • set - true, false, number(if ImageType.logoSet=count)
    • TV - true, false
    • HD - true, false
    • subtitle, ST - true, false
    • watched - true, false
    • top250 - true, false
    • language - not use tag <images>
    • rating - 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 (or real number [0..100] if ImageType.rating=real)
    • videosource, source, VS - text value corresponding <videoSource>
    • videoout, out, VO - text value corresponding <videoOutput>
    • videocodec, vcodec, V? - text value corresponding <videoCodec>
    • audiocodec, acodec, A? - text value corresponding <audioCodec>
    • audiochannels, channels - text value corresponding <audioChannels>
    • container - text value corresponding <container>
    • aspect - text value corresponding <aspect>
    • fps - text value corresponding <fps>
    • certification - text value corresponding <certification>
    • keywords - text value in the movie filename
    • country - text value corresponding <country>
    • company - text value corresponding <company>
    • award - according to ImageType.award
      • true - true/false
      • block - award names
      • count - number of awards won
  • <left> - horizontal offset (optional, integer, def: 0)
  • <top> - vertical offset (optional, integer, def: 0)
  • <align> - horizontal align (optional, [left, center, right], def: left)
  • <valign> - vertical align (optional, [top, center, bottom], def: top)
  • <image> - image file (required)
    • name - parameter name (optional, def: first parameter)
    • value - parameter value corresponding his name (see tag <name>). may be use value "default" if no more matched (required)
    • filename - image filename (required)
  • <position> - parameters of the mutual arrangement (optional)
    • value - parameter`s value (required)
    • left - horizontal offsets (optional, def: from tag <left>)
    • top - vertical offsets (optional, def: from tag <top>)
    • align - horizontal aligns (optional, def: from tag <align>)
    • valign - vertical aligns (optional, def: from tag <align>)
  • <block> - each named block
    • <name> - parameter name
    • <dir> - true(vertical)/false(horizontal)
    • <size> - auto/static
    • <cols> - auto/<number>
    • <rows> - auto/<number>
    • <hmargin> - <number>
    • <vmargin> - <number>

Properties

These properties enable or disable (default) the logos that can be used for each of the image types.

ImageType can be one of "posters", "banners", "thumbnails" or "videoimages"

  • ImageType.xmlOverlayFile
    • The filename for the overlay configuration file. Default is overlay-default.xml

For next options default value is false, set to true to enable.

  • ImageType.xmlOverlay
  • ImageType.logoSet - value count to use number of movies
  • ImageType.logoHD
  • ImageType.logoTV
  • ImageType.logoSet
  • ImageType.logoSubTitle
  • ImageType.language
  • ImageType.rating - value real to use real numbers of rating
  • ImageType.videosource
  • ImageType.videoout
  • ImageType.videocodec
  • ImageType.audiocodec - value block to use all data, instead first
  • ImageType.audiochannels - value block to use all data, instead first
  • ImageType.container
  • ImageType.aspect
  • ImageType.fps
  • ImageType.certification
  • ImageType.watched
  • ImageType.top250
  • ImageType.keywords
  • ImageType.country - value block to use all data, instead first
  • ImageType.company - value block to use all data, instead first
  • ImageType.award - value block to use all data, count to use number of awards

Values ??can be combined with keywords using the parameters:

overlay.keywords.rating, overlay.keywords.videosource, overlay.keywords.videoout, overlay.keywords.videocodec, overlay.keywords.audiocodec, overlay.keywords.audiochannels, overlay.keywords.container, overlay.keywords.aspect, overlay.keywords.fps, overlay.keywords.certification, overlay.keywords.keywords, overlay.keywords.country, overlay.keywords.company, overlay.keywords.award

paramName=keyword1 / synonym1_1 / synonym1_2 ; keyword2 / synonym2_1

Footer images

The imagetype "Footer" (videoname.{footername}.png) shows a video's mediainfo as graphical elements and are exclusively generated by xmlOverlay functions.

They don't contain any artwork (thumbnail, poster, banner ...) and can be positioned independently from artwork (e.g. in indexes).

How to use:

To turn it on, use YAMJ skin-properties:

# number of footers to create
mjb.footer.count=2
# enable or disable footer
mjb.footer.0.enable=true
mjb.footer.1.enable=true
# set footer token name
mjb.footer.0.name=footername1
mjb.footer.1.name=footername2

mjb.forceFooterOverwrite=true

If no footer token name is set, it's footer.0, footer.1, etc.

Create an overlay XML file ({footername}.xml) and together with OverlayXML like for the other imagetypes:

footername1.format=png
footername1.width=450
footername1.height=50
footername1.videoout=true
footername1.container=true
...
footername1.overlay=false
footername1.xmlOverlay=true
footername1.xmlOverlayFile=footer.xml
Comment by project member Stuart.Boston, May 28, 2011
Comment by project member schneelo...@gmail.com, May 28, 2011

Thanks for this nice feature! Maybe I'm a bit stupid but could you please add some more details? What parameter names are allowed? Do they refer to the movie XML files? How do I differ between thumbnail/poster/banner/fanart overlays?

Comment by project member garp999@gmail.com, May 31, 2011

This part makes no sense to me with description...

<images>
<image name="ParamName1" value="true/true" filename="image1.png"/> <image name="ParamName1" value="true/false" filename="image2.png"/> <image name="ParamName1" value="false/true" filename="image3.png"/> <image name="ParamName2" value="true" filename="image4.png"/>
</images>

<image> - image file (required)

name - parameter name (optional, def: first parameter) value - parameter value (required) filename - image filename (required)

Why is ParamName1? used 3 times, and why two parameters like true/true? I would expect true/false to mean 'valid values' for this option but example makes no sense. I can see it used the way 'name' is defined for optional and default values but it would make more sense to allow/have

<image name="ParamName1" value="true/false" optional="true/false" default='true/false' filename="image1.png"/>
and since this is a new feature, everything should assume optional='true' and default='false' when not used, so that value='false' when no parameters used.

Comment by project member ilgi...@gmail.com, Jun 1, 2011

Tag <image> filename associated with the ParameterName? in accordance with "value". If used two and more Params, possible in a single layer display some overlays and need use multiple "value", each element divided slash exam value per param. To better understand the advise to look file overlay-default.xml from default skin and patch to default skin on  issue 1937  (comment 10).

Comment by project member schneelo...@gmail.com, Jun 3, 2011

After playing around with the overlayxml feature and having a look at the source code I wonder how it is possible to get logos/overlays outside of the poster/thumbnail image like in the example above (rating stars, box)? When I use an overlay that is bigger than the poster or lay over the poster's margin the overlay is cropped. I was only able to reproduce the example when the big layer (labeled with "1") was the old/basic overlay.

Comment by project member ilgi...@gmail.com, Jun 4, 2011

Main overlay on example image is box without numbered layers. On file Overlay-example.xml each layers order by image started by zero, zero layer subtitle not showed numbered image. To get logos/overlays outside of the poster/thumbnail image like in the example above (rating stars, box): set after="true". See complete example on  issue 1937  (comment 10).

Comment by project member schneelo...@gmail.com, Jun 5, 2011

Ah, thank you very much, now I know it for sure! Hadn't seen the example in  issue 1937 . I originally thought, layer "1" was box AND set discs. Now I see that was wrong. But that confirms what I thought above. The old/basic overlay (in your example default_overlay_thumbnails.png) defines the final artwork size and the XMLoverlays cannot extend or be outside of that area.

Comment by jean-luc...@wanadoo.fr, Jul 14, 2011

could someone help me to use overlay to add 3D logo to movies with videosource = "3D"

i modified skin.properties adding thumbnails.xmlOverlay=true thumbnails.videosource=true

i updated the overlay code with Code: <layer>

<name>vs</name> <left>0</left> <top>5</top> <align>center</align> <valign>bottom</valign> <images>
<image value="3D" filename="3D.png"/>
</images>
</layer>

without succeed

Comment by project member schneelo...@gmail.com, Jul 14, 2011

Hm, "VS" could be case-sensitive. Did you also try "videosource" or "source"? Just to be sure, have you checked the xml of the movie in the jukebox folder; i.e. 'videosource' has "3D" value?

Comment by jean-luc...@wanadoo.fr, Jul 14, 2011

yes i did tried VS, vs, videosource, source, videoSource in the overlay.xml file i'm sur that videoSource is set to "3D" because i force this value in the NFO and i check in the xml generated ,i tried also "3d" i tried videosource = true , vs=true, VS=true, videoSource=true, source=3d, source=3D in skin.propreties all these tests without success

Comment by jean-luc...@wanadoo.fr, Jul 16, 2011

find the problem skin.properties should be modifide to add

thumbnails.xmlOverlay =true thumbnails.videosource =true

and inside overlay <name>videosource<name> instead of vs

Comment by project member schneelo...@gmail.com, Jul 16, 2011

Ok, but isn't that exactly what you've already used (see your first post above)?

Comment by jean-luc...@wanadoo.fr, Jul 20, 2011

you are right and it's the reason why i did post (i didn't understand why this adding doesn't play)

so your comment remember me several modifications i did made to allow this code to play well

- inside skin.properties i change thumbnails.overlay=false (i think this line was in conflic with thumbnails.xmlOverlay=true) - inside default-overlay.xml i suppress any reference to VS and add a single layer with <layer after=true> <name>videosource</name>

Comment by project member schneelo...@gmail.com, Oct 31, 2011

Are the values case-sensitive? I.e. is it enough to search only for "matroska" or do I need to search for "matroska" and "Matroska" in a container template?

Comment by rezur...@gmail.com, Oct 31, 2011

they are not case-sensitive

Comment by project member schneelo...@gmail.com, Nov 26, 2011

This Wiki should also say that we have the possibility to use - besides <left>, <top>, <align>, <valign> - <width> and <height> in order to scale the icons. Just found aout accidently.

I would also appreciate a concrete example for "block" - from what I can read above I don't eg. know if it's part of a layer; is it used together with the other values or is it a separate block?

Comment by project member schneelo...@gmail.com, Nov 28, 2011

Great! Many thanks for the update.

So a <block> is always related to the <layer> before it, right? And I noticed "clones=false" in the new example; I guess it's to prevent an icon showing up twice?

Comment by project member ilgi...@gmail.com, Nov 29, 2011

Block relate to the layer by name. You are right about "clones=false".


Sign in to add a comment
Powered by Google Project Hosting