Players

Display Media with MPCDI

12min
brightsign players support the mpcdi specification for warping and edge blending this page outlines how to display media—including images, video, and html—using mpcdi note that some knowledge of brightscript is required to develop mpcdi applications on brightsign players the api described below requires brightsignos version 7 0 or later support overview series 4 (xtx44, xdx34, hdx24) and series 3 (xtx43, xdx33, hdx23, ho523) players support all levels of the mpcdi 2d media profile the 4kx42 players also support mpcdi, but at level 1 and level 2 only we recommend series 3 or 4 players for optimal rendering speeds mpcdi version 1a is implemented on series 3 and 4 players it’s not supported on series 5 players media types mpcdi is supported with graphics objects such as roimagewidget , rohtmlwidget , and rotextwidget it does not support the rovideoplayer object; to apply mpcdi to a video, display the video as part of an html page brightscript api for mpcdi the brightscript api is designed such that information corresponding to a particular region must be extracted from the mpcdi file and then passed to the rovideomode setmpcdi() method once the configuration information for a region is passed into the player, mpcdi is enabled, and media displayed in html, image, and text widgets will be warped according to the configuration since the mpcdi configuration file might contain more than one region, the autorun script on the player will need to select a particular region from the mpcdi file and parse the data for that region before using it to configure the player note that each player can display one mpcdi region only if you wish to bypass writing a script to parse mpcdi data and configure the player, you can use the template script attached to this page (see the mpcdi template script section below for more details) enabling mpcdi to enable mpcdi, call the rovideomode setmpcdi() method setmpcdi(parameters as roassociativearray) as boolean enables mpcdi using an associative array of parameters this method returns true if mpcdi has been enabled and false if it could not be enabled the associative array must contain the following parameters region roassociativearray roassociativearray an associative array of parameters containing region data xresolution int int the viewport width, which corresponds to the \<xresolution> attribute in the \<region> tag of the mpcdi xml configuration file yresolution int int the viewport height, which corresponds to the \<yresolution> attribute in the \<region> tag of the mpcdi xml configuration file x float float the region coordinate horizontal position, which corresponds to the \<x> attribute in the \<region> tag of the mpcdi xml configuration file y float float the region coordinate vertical position, which corresponds to the \<y> attribute in the \<region> tag of the mpcdi xml configuration file xsize float float the region coordinate width, which corresponds to the \<xsize> attribute in the \<region> tag of the mpcdi xml configuration file ysize float float the region coordinate hieght, which corresponds to the \<ysize> attribute in the \<region> tag of the mpcdi xml configuration file blendmaps roarray roarray an array containing one or two entries describing blend map data the array must contain an entry describing alpha map parameters, and may contain a second entry describing beta map parameters each entry must have the following parameters mapname string string the map name, which can be either "alpha" or "beta" width int int the map width, as provided in the map png file height int int the map height, as provided in the map png file comdepth int int the number of components held in the map, which corresponds to the \<alphamap> or \<betamap> tag in the mpcdi xml configuration file size int int the size of the decoded png file data (in bytes) gammacorrection float float the gamma correction value, which corresponds to the \<gammaembedded> attribute in the \<alphamap> tag of the mpcid xml configuration file (this setting does not apply to a beta map) data robytearray robytearray the decoded png data warp roassociativearray roassociativearray an associative array of parameters containing warp data width int int the width of the geometry warp map, which is provided in the pfm file height int int the height of the geometry warp map, which is provied in the pfm file data roarray roarray the extracted pfm file data as an array of float values disabling mpcdi to disable mpcdi, pass invalid to the setmpcdi() method example brightscript vm = createobject("rovideomode") mpcdi params = invalid vm setmpcdi(mpcdi params) mpcdi template script the brs script attached to this page will extract all relevant data from an mpcdi file and use it to configure mpcdi on the player it then displays up to three html widgets one widget can be used to display a video or image as a simple html page, while the other two display html pages from the web the main() function accepts an array of parameters brightscript \[mpcdi enabled, widget count, filename mpcdi, mode, ip media filename] mpcdi enabled string a flag that determines whether mpcdi is enabled ("on") or disabled ("off") widget count int the number of widgets to display on screen (1, 2, or 3) if you specify a single widget, the image/video widget will be displayed as full screen filename mpcdi string the name of the mpcdi file mode string the mode of the image/video widget ("image" or "video") ip media filename string the name of the media file to display in the image/video widget to modify the html pages displayed by the second and third widgets, change the seturl() strings in the showuserwidgets() function setting mpcdi regions if you are using the template script attached to this page, you will need to assign each player to an mpcdi region before running the script this is done by writing the region assignment to the player registry the template script will retrieve the value from the registry and use it to extract the correct region data from the mpcdi file you can write region assignments to the registry using the brightsign shell, or you can use brightscript brightsign shell perform the following steps on each brightsign player that is part of the mpcdi display connect the player to a pc using a serial cable https //brightsign atlassian net/wiki/spaces/doc/pages/388434643/serial+port+configuration or telnet/ssh https //brightsign atlassian net/wiki/spaces/doc/pages/370673607/telnet+and+ssh power off the player and remove the microsd card or other storage power on the player wait until the brightsign splash screen appears on the display depress the svc button on the player this will result in entry into the brightsign> shell type "registry write brightscript mpcdi region \[region id]", where \[region id] refers to the id attribute in the mpcdi xml file associated with the region you wish to assign the player press enter when finished type "reboot" and press enter if you later need to retrieve the region id stored in the player registry, you can enter the following command into the shell "registry read brightscript mpcdi region" brightscript include the following in your autorun, plugin, or standalone script brightscript reg = createobject("roregistrysection", "brightscript") reg write("mpcdi region","region id") the "region id" refers to the id attribute in the mpcdi xml file associated with the region you wish to assign the player if this code is part of an autorun, you will need to develop a mechanism to differentiate among players and assign the correct region id automatically you will also need to reboot the player at some point (for example, by calling rebootsystem() ) before displaying mpcdi so that the registry write goes into effect if you later need to retrieve the region id stored in the player registry, you can call the roregistrysection read() method https //archbee doc uploads s3 amazonaws com/tyaqenq txckpox4eakhe tqaom8iqxj0v9hptgha0l 20250409 181454 brs