Video with transparency

From SpinetiX Support Wiki

Jump to: navigation, search

Applies to HMP350 .

Introduction

Video with transparency is a special feature of SpinetiX HMP350 players that enables unique scenarios of virtual advertisement, where a partially transparent video is displayed on top of a background, which can be anything from an image, another video to a live-streaming video (see some videos below) or even dynamic data-driven content, like in the video below:

How it is done

Alpha blending

Transparency for images is achieved through by storing additional data in the alpha channel with a value between 0 and 1. A value of 0 means that the pixel is fully transparent; a value of 1 means that the pixel is opaque.

Alpha blending is the process of combining a translucent foreground color with a background color, thereby producing a new blended color. The degree of the foreground color's translucency may range from completely transparent to completely opaque. If the foreground color is completely transparent, the blended color will be the background color. Conversely, if it is completely opaque, the blended color will be the foreground color. The translucency can range between these extremes, in which case the blended color is computed as a weighted average of the foreground and background colors.

Mask video

Alpha blending on video

We have taken this principle and extended it to videos so that "transparent videos" can be rendered. This is done by combining a regular video with a black & white "mask" video that defines the pixel transparencies, where black is fully transparent, white is fully opaque and shades of gray indicate partial transparency.

Note Notes:
  • As the “mask” video encodes the transparency information of each frame in the original video, the two videos must have the same resolution.
  • It is not recommended to use full HD resolution videos for this, as rendering two full HD videos simultaneously is outside the player specification. Furthermore, if there is a third video in the background, the videos should be at maximum 720p resolution.
  • Creating a black & white "mask" video starting from the original video should be rather easy for someone used to video editing software, like Adobe Premiere.

Combining the two videos

Using the spx:mask-href attribute

The support for rendering transparent videos was added in Elementi 2016.

To apply the "mask" video onto the original video, you need to do the following:

  1. Import both videos into your Elementi project.
  2. Drag & drop the original video into the Preview panel or the Edit panel as usual.
  3. Click the Elementi Icons Layer Properties.png button (it opens the "Layer Properties" dialog) within the Edit panel.
  4. Go to "Advanced" tab.
  5. Click the "Click to add..." field under the "Name" column until the selection box is expanded.
  6. Select the spx:mask-href attribute from the list.
  7. Click on the right column next to it (under the "Value" column).
  8. Enter the name of the "mask" video on the "Value" column next to it.
  9. Press the "Enter" key to validate the chosen value, then click "OK".
  10. Done - you can now publish your project onto an HMP350.

See also

This page was last modified on 5 May 2020, at 20:36.