Video with transparency
From SpinetiX Support Wiki
Applies to HMP350 .
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
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.
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.
- 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
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:
- Import both videos into your Elementi project.
- Drag & drop the original video into the Preview panel or the Edit panel as usual.
- Click the button (it opens the "Layer Properties" dialog) within the Edit panel.
- Go to "Advanced" tab.
- Click the "Click to add..." field under the "Name" column until the selection box is expanded.
- Select the spx:mask-href attribute from the list.
- Click on the right column next to it (under the "Value" column).
- Enter the name of the "mask" video on the "Value" column next to it.
- Press the "Enter" key to validate the chosen value, then click "OK".
- Done - you can now publish your project onto an HMP350.