---
title: roVideoMode
slug: develop/rovideomode
docTags: 
createdAt: 2025-03-11T07:07:18.733Z
---

This object allows you to configure resolution and other video output settings. The same video resolution is applied to all video outputs on a BrightSign player. Video or images that are subsequently decoded and displayed will be scaled (using the hardware scalar) to this output resolution if necessary. The JavaScript equivalent is [videomodeconfiguration](docId\:uupZxkYFlBSOLyh8oLcES) (see the "roVideoMode" section of the [BrightScript-JavaScript Migration Guide](docId:2KEwWxLmpYcwu8tffuf2Z) for the equivalent methods).

Object Creation: The *roVideoMode&#xA0;*&#x6F;bject is created with no parameters.

:::BlockQuote
CreateObject("roVideoMode")
:::

The *roVideoMode&#x20;*&#x6F;bject generates *roHdmiInputChanged&#x20;*&#x61;nd *roHdmiOutputChanged&#x20;*&#x65;vent objects whenever the hotplug status of the HDMI® input or output changes. The system will generate an *roHdmiEdidChanged&#x20;*&#x65;vent when an HDMI cable is hotplugged and the EDID information changes.

# ifVideoMode

### GetScreenModes()

Returns a roArray which contains a roAssociativeArray describing each available output on your player hardware and how those outputs are configured. This method has been implemented as of BOS 9.0.15.

When calling `GetScreenModes()`, confirm that the HDMI array positions are valid so you don't accidentally use an undefined array. For example, if you call `GetScreenModes()` on a four-output player that only has one connected display, you won't get a valid return on the other outputs.

The members are:&#x20;

- `name`: On the XC platform, the possible values are HDMI-1, HDMI-2, HDMI-3, or HDMI-4.  The number of array items depend on the number of outputs:
  - The XC2055 has two outputs, HDMI-1 and HDMI-2
  - The XC4055 has four outputs, HDMI-1, HDMI-2, HDMI-3, and HDMI-4
  - The name tells the system which output is associated with the rest of the settings in that entry within the roAssociativeArray (the order of the HDMI outputs is not important).
- `video_mode`: The videomode can be either:
  - A known BrightSign format videomode (for example, *1920x1080x60p)*
  - A full modeline as described in [Apply a Custom Resolution](docId:58VplQM4sGH_VgqVs4Frs)&#x20;
  - *auto&#x20;*&#x77;hich differs slightly from previous platforms. *auto* isn’t recommended when using multiple outputs because the canvas positions are fixed and so if a screen uses an unexpected resolution then it won’t be positioned correctly in the canvas.
- `display_x` and `display_y`: The position of the screen within the overall canvas. The origin (0,0) is the top left corner, and each screen can be positioned relative to it. This allows gaps to be left on the canvas between screens for bezel compensation.
- `transform`: One of normal, 90, 180 or 270 rotation. Each screen can be rotated independently. When a screen is rotated, it rotates all of the content including video. If a single screen is set to *1920x1080x60p* and 90 then the screen is running in portrait mode and all of the firmware will run as if the screen is set to *1080x1920x60p* with video and graphics all rotated.
- `enabled`: Whether the screen is enabled for output. To turn an output to off, set `enabled = false`. No other fields need to be set.

If you do not want to change the existing screen settings, do not enter a value for those settings.

### SetScreenModes (ScreenConfigList configs)

Takes the same format as argument that `GetScreenModes()` returns. By default a single screen is enabled. The player uses full resolution graphics if any of the videomodes configured using `SetScreenModes` use the `:fullres` modifier. BrightSign Author always sets `:fullres` on all of the videomodes for the XC5. See [roVideoMode](docId\:QQ734nQz0hCwNI0uNSdMP) to understand how the x/y display coordinates works with output resolution.

:::hint{type="info"}
Calling `SetScreenModes()` to change the screen HDMI configuration will cause the player to reboot when it makes that change.
:::

This method has been implemented as of BOS 9.0 and later.

To configure two screens, enter:

:::BlockQuote
vm = CreateObject("roVideoMode")
sm = vm.GetScreenModes()

sm\[0].video\_mode="1920x1080x60p"
sm\[0].transform = "normal"
sm\[0].display\_x=0
sm\[0].display\_y=0
sm\[0].enabled = true

sm\[1].video\_mode="1920x1080x60p"
sm\[1].transform = "normal"
sm\[1].display\_x=0
sm\[1].display\_y=1080
sm\[1].enabled = true

vm.SetScreenModes(sm)
:::

To configure a 1x2 video wall with bezel compensation, enter:

:::BlockQuote
vm = CreateObject("roVideoMode")
sm = vm.GetScreenModes()

sm\[0].video\_mode="1920x1080x60p"
sm\[0].transform = "normal"
sm\[0].display\_x=0
sm\[0].display\_y=0
sm\[0].enabled=true

sm\[1].video\_mode="1920x1080x60p"
sm\[1].transform = "normal"
sm\[1].display\_x=0
sm\[1].display\_y=1100    ' Bezel compensation of 20 pixels
sm\[1].enabled=true

sm\[2].enabled=false
sm\[3].enabled=false

vm.SetScreenModes(sm)
:::

In this case the resulting canvas will be 1920x2180, and full screen video and graphics will display across all outputs.

:::hint{type="info"}
To calculate the size of a screen bezel in pixels from millimeters, you must multiply the screen width/height in pixels by the bezel size in millimeters, then divide by the screen width/height in millimeters. You can add this bezel area to the wall width and height to get the total bezel-adjusted resolution.
:::

### GetPerformanceMetrics

This method returns the last, peak, and average measured GPU values.

### SetMode(mode As String) As Boolean

Sets the video output mode. See [this page](docId\:QpML112mBhEK7LBDGUxnv) for a list of supported video modes. This method also accepts ["auto"](docId\:QQ734nQz0hCwNI0uNSdMP) as a mode parameter, or "custom" which will use the mode configured using SetCustomModeline.&#x20;

T<font color="#0C121D">he boolean value </font><font color="#0C121D">can return </font>`true` or `false`<font color="#0C121D">, or not return control to the BrightScript caller at all</font>.  When a real mode change is required (for example: 640x480x60p -> 1920x1080x60p) an application restart will occur on Series 5 or 6 players, and a full reboot will happen on Series 3 or 4 players.  Refresh rate changes (for example, 1920x1080x30p -> 1920x1080x60p) causes an application restart on Series 5 and 6 players , but not on Series 3 and 4 players, where no application restart or player reboot occurs if the mode change is limited to only changing the refresh rate.&#x20;

- SetMode returns `false` and control is returned to the BrightScript caller to take any required action in the following scenarios:
  - An invalid/unsupported mode string is passed (for example a malformed mode name)
  - A mode that is not supported on the current player/output constraints is requested
  - A mode option that requires unavailable configuration (for example, `custom` without valid custom timing configured) is used
- SetMode returns `true` if no action is taken because the mode is already set to the requested mode. If the script sets the mode to the same string returned by `GetMode()`,  the call will return to the script and print the result. The code block below is an example which will cause the application to restart:

:::CodeblockTabs{indent="1"}
```none
Sub Main()
	videoMode = CreateObject("roVideoMode")
	currentMode = videoMode.GetMode()
	print "current mode: "; currentMode
	print "setting mode to current mode: "; currentMode
	result = videoMode.SetMode(currentMode)
	print "SetMode returned: "; result
End Sub
```
:::

- If the mode is a genuine mode change, the BrightSign application will stop, the video mode will change, and the application will restart. Control will not reach the line `print "SetMode returned: "; result`. &#x20;

The following optional parameters can be appended to the string:

- `<resolution>:<color_space>:<depth>bit`: Sets the [video profile](docId\:iqN3Si7i3oTm20ccgRPoX) for HDMI output. BrightSign supports the following color space modifiers:
  - 420 (4:2:0 YUV)
  - 422 (4:2:2 YUV, only for 12-bit and only for 4K modes)
  - 444 (4:4:4 YUV)
  - rgb (RGB, always implicitly 4:4:4)
  - For example, to output 4Kp60 at the 420 (4:2:0 YUV) color space with 10 bits of depth, you would pass the following string: `"3840x2160x60p:420:10bit"`
- `<resolution>:preferred`: Enables the preferred video mode setting. This instructs the player to only use the video mode if the display EDID indicates that it is supported. Otherwise, the output will default to "auto" mode. If no EDID is detected at bootup, the player will output the preferred video mode. If an HDMI hotplug event occurs afterward, then the player will perform the preferred video-mode check again. The `:preferred` flag currently ignores video profile settings (i.e. color space and bit depth).
- `<resolution>:fullres`: Enables full-resolution graphics. This instructs the player to match the graphics plane to the video mode; otherwise, video modes larger than 1920x1200 upscale the graphics plane to match the video output. See [Full-Resolution Graphics](docId\:TJNw230KCx6i9tNihfCvD) for more details and a list of supported modes/models. If the `fullres` mode is used with graphics-intensive HTML applications, we recommend enabling the `gfxmemlarge` setting as well.
- `<resolution>:gfxmemlarge`: Enables the large graphics memory configuration for XTx44 and XTx43 models (at the expense of general-purpose memory). This setting requires a reboot to take effect.
- `<resolution>:gfxmemdefault`: Resets the graphics memory configuration to default. This setting requires a reboot to take effect.
- `<resolution>:dbv`: Enables Dolby Vision on video output (XTx44 only). Only one video decoder is available when Dolby Vision is enabled.
- `<resolution>:rgb:<range>`: Sets the color space to RGB. The optional `<range>` parameter can be one of the following values:
  - `auto`: The default setting. Over HDMI, the player will output RGB Full for VESA modes and RGB Limited for TV modes. Over DVI, the player will output RGB Full for all modes.
  - `fullrange`: The RGB Full (0-255) setting
  - `limitedrange`: The RGB Limited (16-235) setting/

:::hint{type="info"}
BrightSign hardware has a video anti-aliasing low-pass filter that is set automatically.
:::

### SetCustomModeline(roString modeline) As roBool

Sets the custom videomode with the supplied modeline (see [Apply a Custom Resolution](docId:58VplQM4sGH_VgqVs4Frs)). The custom videomode can then be selected using SetMode.

### GetModeForNextBoot() As String

Returns the target video mode of the player the next time it reboots. The return value is specified with the `SetModeForNextBoot()` method.

### SetModeForNextBoot(mode as String)

Sets the target video mode of the player, which will take effect when the player next reboots.&#x20;

### GetBestMode(connector As String) As String

Returns the highest [video mode](docId\:QpML112mBhEK7LBDGUxnv) for this player that can be supported by the display via EDID. The video connector can be specified as `"hdmi"` or `"vga"` (these values are case sensitive). If the display does not return a resolution value over EDID (or if no display is connected), this method returns a blank string.

### GetMode() As String

Returns the current video mode of the player, which is specified using the `SetMode()` method.

### GetFailureReason() As String

Returns additional information when a member function returns `false`.

### GetAvailableModes() As Array 

Returns all video modes supported by the player as an array of of entries. Each entry is an associative array with the following values:

:::hint{type="info"}
In 4K modes, the graphics plane may be smaller than the video plane and output. In these cases, the graphics plane to match the video plane/output.
:::

- `videomode` <font color="#704ae0">string</font>: A description of the video mode (a full list of modes can be found on [this page](docId\:QpML112mBhEK7LBDGUxnv))
- `width` <font color="#704ae0">int</font>: The width of the video output
- `height` <font color="#704ae0">int</font>: The height of the video output
- `graphicsPlaneWidth` <font color="#704ae0">int</font>: The width of the graphics plane 
- `graphicsPlaneHeight` <font color="#704ae0">int</font>: The height of the graphics plane
- `framerate` <font color="#704ae0">int</font>: The frame rate of the video output
- `interlaced` <font color="#704ae0">boolean</font>: A flag indicating whether the video output is interlaced (`true`) or progressive (`false`)
- `overscan` <font color="#704ae0">boolean</font>: A flag indicating whether the video output is using an overscan setting or not
- `colorspace` <font color="#704ae0">string</font>: The color space of the video signal ("rgb", "yuv420", or "yuv422")
- `colordepth` <font color="#704ae0">string</font>: The color depth of the video signal ("8bit", "10bit", or "12bit")
- `dropframe` <font color="#704ae0">boolean</font>: A flag indicating whether the video timecode utilizes drop frames 
- `preferred` <font color="#704ae0">boolean</font>: A flag indicating whether the video mode is the preferred mode, which is configured using the `SetMode()` method

### GetActiveMode() As AssociativeArray

Returns information about the current video mode as an associative array:

- `videomode` <font color="#704ae0">string</font>: The current video mode (e.g. "3840x2160x60p")
- `colordepth` <font color="#704ae0">string</font>: The current color depth ("8bit", "10bit", or "12bit")
- `colorspace` <font color="#704ae0">string</font>: The current color space ("rgb", "yuv420", or "yuv422")
- `preferred` <font color="#704ae0">string</font>: A "true" or "false" string indicating whether the current video mode is the preferred mode, which is set using the SetMode() method.

### GetConfiguredMode() As AssociativeArray

Returns information about the video mode configured using the `SetMode()` method. This method returns an *roAssociativeArray*; see the [GetAvailableModes()](docId\:QQ734nQz0hCwNI0uNSdMP) entry for more details about returned values. If the video mode is set to `"auto"`, this method will return Invalid.

### GetFPS() As Integer

Returns the current framerate of the video output.

### SetDecoderMode(decoder As String, timeslice\_mode As String, z\_order As Integer, friendly\_name As String, enable\_mosaic\_deinterlacer As Boolean) As Boolean 

Configures a video decoder for either standard mode or Mosaic mode. In standard mode, a single decoder is used to play a single video; in Mosaic mode, the decoder can be used to decode multiple videos from different local or remote sources. See the [Selecting Decoders](docId\:QQ734nQz0hCwNI0uNSdMP) section below for more information on assigning video players to decoders in HTML or BrightScript.

:::hint{type="info"}
Series 5 players don’t need Mosaic mode to decode multiple videos if the videos have a low pixel count and do not contain more total pixels than the Series 5 video pipeline can process.
:::

- `decoder`: The video decoder to be used (decoder availability differs by model).
  - "4K": The primary 4K decoder (XTx44 models only)
  - "4K2": The secondary 4K decoder (XTx44 models only)
  - "4K": The sole 4K decoder (HDx24, XTx43, 4Kx42, XDx34, XDx33 and HDx24 models only)
  - "HD1": The primary HD decoder
  - "HD2": The secondary HD decoder
- `timeslice_mode`: The maximum resolution that the decoder will accept (at framerates up to 60p). If this resolution is the same as the decoder's maximum resolution limit, the decoder will use standard mode, not Mosaic mode.
  - "4K": 3840x2160
  - "HD": 1920x1080
  - "SD": 720x576
  - "CIF": 352x288
  - "QCIF": 176x144

:::hint{type="danger"}
Upscaling videos in Mosaic mode currently causes severe performance degradation.
:::

- `z_order`: The z-order of the video window (in standard mode) or group of video windows (in Mosaic mode). A positive integer positions the video window(s) in front of the graphics plane, while a negative integer positions the video(s) behind the graphics plane. If there are two video decoders in use, the video window(s) of the decoder with the higher `z_order` value will be positioned in front. The graphics plane z-order can be modified with the roVideoMode.SetGraphicsZOrder() method, and the video decoder z-order can be modified with the roVideoPlayer.ToFront()/ToBack() methods.
- `friendly_name`: A human-readable name for referencing the decoder in HTML and scripts
- `enable_mosaic_deinterlacer`: A Boolean value indicating whether Mosaic-mode videos can be interlaced or not. Enabling the deinterlacer will allow playback of interlaced videos in Mosaic mode, but will reduce the number of Mosaic-mode videos that can be decoded simultaneously as well.

### GetDecoderModes() As roArray

Returns an array of associative arrays, each one corresponding to a single decoder. Each associative array contains the following entries:

- `decoder_name` <font color="#704ae0">string</font>: The system name of the decoder
- `friendly_name` <font color="#704ae0">string</font>: The name of the decoder as specified when calling `SetDecoderMode()`
- `max_decode_size` <font color="#704ae0">string</font>: The maximum resolution of the decoder, as set by system software. This value can be either "4K" or "HD"
- `configured_decode_size` <font color="#704ae0">string</font>: The maximum resolution of the decoder that is specified when calling `SetDecoderMode()`
- `mode` <font color="#704ae0">string</font>: The current mode of the decoder, which can be either "Regular" or "Mosaic"
- `usage_count` <font color="#704ae0">int</font>: The number of videos currently being decoded by the decoder
- `max_usage` <font color="#704ae0">int</font>: The maximum number of videos that can be decoded simultaneously by the decoder. The optimum `max_usage` limits are described below; the limit may be lower depending on a number of factors, including interlacing and frame rate.
  - 4K decoder:
    - 1 4K video
    - 2 HD videos
    - 4 SD videos
    - 8 CIF videos
    - 10 QCIF videos
  - HD decoder:
    - 0 4K videos
    - 1 HD video
    - 3 SD videos
    - 4 CIF videos
    - 5 QCIF videos
- `mosaic_mode_interlace` <font color="#704ae0">string</font>: The current deinterlacing mode of the decoder, which can be either "Enabled" or "Disabled". This value is specified when calling `SetDecoderMode()`.

### Set3dMode(mode As Integer) As Boolean

Sets the 3D video output mode, which is specified by passing one the following parameters:

- 0: Standard mono video (default)
- 1: Side-by-side stereo video
- 2: Top-and-bottom stereo video

### Screenshot(parameters As roAssociativeArray) As Boolean

Captures a screenshot of the video and graphics layer as a *.jpeg&#x20;*&#x6F;r *.bmp&#x20;*&#x66;ile. The screenshot is configured by passing an associative array of parameters to the method:

- `filename` <font color="#704ae0">string</font>: The name and path of the image file that will be saved (e.g. "SD:/myscreenshots/screen.jpg"). If the specified directory does not exist, the screenshot will fail.
- `width` <font color="#704ae0">int</font>: The width of the image file.
- `height` <font color="#704ae0">int</font>: The height of the image file.

:::hint{type="info"}
The default dimensions of the image file is 640x480.
:::

- `filetype` <font color="#704ae0">string</font>: A string determining whether the image is a "JPEG" or "BMP" file type. Note that the file extension (".jpg" or ".bmp") is not appended to the filename by default and, if needed, should be included in the `filename` string.
- `quality` <font color="#704ae0">int</font>: The image-quality value (between 0 and 100) of the screenshot. This parameter is set to 50 by default.
- `async` <font color="#704ae0">int</font>: A flag that determines whether the screenshot should be taken synchronously or asynchronously. If set to 0, the function returns `true` after the image file has successfully finished writing. If set to 1, the function will return `true` prior to saving the file, then return an *roScreenShotComplete&#x20;*&#x65;vent once the file has finished writing.
- `rotation` <font color="#704ae0">int</font>: The rotation of the screenshot image (in degrees). The default value is 0. Accepted values are 0, 90, 180, and 270.

### GetResX() As Integer

Returns the current width of the graphics plane.

### GetResY() As Integer

Returns the current height of the graphics plane.

### GetVideoResX() As Integer

Returns the current width of the video plane.

### GetVideoResY() As Integer

Returns the current height of the video plane.

### GetOutputResX() As Integer

Returns the width of the display for the current video mode.

### GetOutputResY() As Integer

Returns the height of the display for the current video mode.

:::hint{type="info"}
The coordinate system for content placement on screen is based on the graphics plane. In most cases, the values returned by `GetResX()/GetResY()`, `GetVideoResX()/GetVideoResY()`, and `GetOutputResX()/GetOutputResY()` will be identical.

&#x20;The "GetRes" and "GetVideoRes" values will sometimes differ when using 4K modes if the graphics plane (i.e. "GetRes") remains at 1920x1080, while the video plane (i.e. "VideoRes") expands (e.g. to 3840x2160). The "OutputRes" value will differ from the other two values when the video output is upscaled: For example, when upscaling from HD to 4K, the "GetRes" and "GetVideoRes" values will remain at 1920x1080, while the "OutputRes" values will indicate 3840x2160. To know where you are drawing on this relative scale, query the player for the size of the graph since it is not always the same size as the output resolution.
:::

### GetSafeX() As Integer

Returns the horizontal coordinate for the upper-left corner of the "safe area". For modes that are generally displayed with no overscan, this will be zero.

### GetSafeY() As Integer

Returns the vertical coordinate for the upper-left corner of the "safe area". For modes that are generally displayed with no overscan, this will be zero.

### GetSafeWidth() As Integer

Returns the width of the "safe area." For modes that are generally displayed with no overscan, this will return the same as *GetResX*.

### GetSafeHeight() As Integer

Returns the height of the "safe area." For modes that are generally displayed with no overscan, this will return the same as *GetResY*.

:::hint{type="info"}
More information about safe areas can be found here:

- [Safe area](http://en.wikipedia.org/wiki/Safe_area)&#x20;
- [Overscan](http://en.wikipedia.org/wiki/Overscan_amounts)&#x20;
:::

### SetGraphicsZOrder(order As String) As Boolean 

Specifies the order of the graphics plane (which includes all graphical elements) in relation to the video plane(s). This method accepts three parameters:

- `"front"`: Places the graphics plane in front of the video plane(s).
- `"middle"`: Places the graphics plane between two video planes. This option is only applicable for models that have two video decoders (e.g. XTx44, XDx34).
- `"back"`: Places the graphics plane behind the video plane(s).

If the player is rendering two videos, the `front` and `back` options will always place the graphics plane in front of or behind both video planes. To determine the z-order of video planes in relation to one another, use the `ToFront()` and `ToBack()` methods provided by the *roVideoPlayer*  object. The following table shows all possible video and graphics z-order arraignments that can be specified using the `SetGraphicsZOrder()` method and calling the `ToFront()`  and `ToBack()` methods on a "Video1" *roVideoPlayer* instance.

| **SetGraphicsZOrder()** | **front** | **front** | **middle** | **middle** | **back**  | **back** |
| ----------------------- | --------- | --------- | ---------- | ---------- | --------- | -------- |
| ToFront()/ToBack()      | ToFront() | ToBack()  | ToFront()  | ToBack()   | ToFront() | ToBack() |
| Z-Order                 | Graphics  | Graphics  | Video1     | Video2     | Video1    | Video2   |
|                         | Video1    | Video2    | Graphics   | Graphics   | Video2    | Video1   |
|                         | Video2    | Video1    | Video2     | Video1     | Graphics  | Graphics |

### PauseGraphics(timeout\_in\_ms As Integer) As Boolean

Suspends graphics compositor updates for the specified number of milliseconds (or until the ResumeGraphics() method is called), up to a maximum interval of 10 seconds. While the graphics compositor is paused, no visual elements will be updated (except for [HWZ video](docId\:e6uJleH69Q0JmMv8kyTrp), [scrolling tickers](docId\:GQeNKTmmFazEjdlZHttIZ), and off-screen Chromium textures). Use this method to combine `Show()`, `Hide()`, `Raise()`, `Lower()`, and `SetRectangle()` operations into a single v-sync update.

### ResumeGraphics() As Boolean

Resumes the graphics compositor if it has been paused with the `PauseGraphics()` method.

### SetImageSizeThreshold(parameters As roAssociativeArray) As Boolean 

Changes the maximum allowed size for images. Images sizes are measured in bytes using the following formula: `image_width * image_height * 4`.

The default image size limit is 35389440 bytes (equivelant to 3840x2160x32bpp) for XTx44, XTx43, XDx34, XDx33, and 4Kx42 models and 2621440 bytes (equivelant to 2048x1280x32bpp) for other models. Displaying images larger than the default value may deplete the graphics memory and cause a crash, so we recommend testing a script that uses this method thoroughly before deploying it in a production environment. This method accepts an associative array with the following parameters:

- `width` <font color="#704ae0">int</font>: The image width value
- `height` <font color="#704ae0">int</font>: The  image height value
- `ignore` <font color="#704ae0">int</font>: A flag specifying whether the image size limit is enabled (0) or disabled (1)

:::hint{type="success"}
You can also increase the default maximum width/height by reducing the bpp value (e.g. using a 3840x1280x16bpp on non-4K-capable players is allowed); however, this method is not applicable to HTML pages because Chromium always decodes images to RGBA 8888.
:::

### AdjustGraphicsColor(parameters As roAssociativeArray) As Boolean

Adjusts the video and graphics output of the player using the following parameters, which can be passed to the method as an associative array: "brightness", "hue", "contrast", "saturation". Each parameter has a default value of 0 and can accept a range of values between -1000 and 1000.

### ConfigureHdmiInput(parameters As roAssociativeArray) As Boolean

Configures EDID reporting for the HDMI input. By default, the input EDID includes video modes from the display attached to the HDMI output, some video modes supported by the player, and support for PCM audio up to 48kHz; it does not report proprietary media codecs that can be decoded by the device connected to the HDMI output, so you can use this method to announce such support if available at the endpoint. Using this method to change the default configuration will trigger a reboot on the player.

:::hint{type="info"}
The boolean return value from this method does not follow the usual conventions for BrightScript methods. Instead, a return value of `false` means that *either* the supplied parameters were invalid and the method call has failed *or* that the parameters were accepted but no change was made to the HDMI configuration. Conceptually this method would return `true` to indicate that the HDMI configuration has changed but in practice the player always reboots in this situation so the script will never see a return value of true. The caller can determine whether the operation did in fact succeed by inspecting the result of `GetLastFailureReason()`.
:::

The passed associative array can contain the following parameters:

- `MaxHdcpVersion` <font color="#704ae0">int</font>: The maximum supported version of HDCP advertised by the HDMI input. The default value is 2, which indicates support for HDCP 2.2. It can also be set to 1, which limits advertised support to HDCP 1.4. Series 4 and 5 BrightSign players support HDCP version 1.4.
- `MaxSampleRate` <font color="#704ae0">int</font>: The maximum supported PCM audio sampling rate in Hz (e.g. the default sampling rate is 48000)
- `MaxChannelCount` <font color="#704ae0">int</font>: The number of PCM channels that are advertised over EDID. The default value is 2, which allows for stereo mixdown. Increasing this value to 6 allows the source to send multichannel PCM. If AC-3 or E-AC-3 is enabled on the player, multichannel audio is supported regardless of the MaxChannelCount setting. 
- `EnableAC3` <font color="#704ae0">int</font>: A flag specifying whether AC-3 is not supported (0) or supported (1)
- `EnableEAC3` <font color="#704ae0">int</font>: A flag specifying whether E-AC-3 is not supported (0) or supported (1)
- `EnableTrueHDMlp` <font color="#704ae0">int</font>: A flag specifying whether TrueHD MLP is not supported (0) or supported (1)
- `EnableDTS` <font color="#704ae0">int</font>: A flag specifying whether DTS is not supported (0) or supported (1)
- `EnableDTSHD` <font color="#704ae0">int</font>: A flag specifying whether DTS-HD is not supported (0) or supported (1)
- `LockAudioToVideoClock` <font color="#704ae0">int</font>: A flag specifying whether the audio sample rate clock is locked to the audio clock (0) or video clock (1) of the incoming HDMI signal.
- `EdidFilename` <font color="#704ae0">string</font>: Allows a valid EDID filename to be passed to the HDMI input (if the filename is not valid, it will be rejected and an error will appear in the log). In the example below, the HDMI input will be configured with the EDID from edid.bin on bootup:

:::BlockQuote
vm=CreateObject("roVideoMode")
vm.ConfigureHdmiInput(\{EdidFilename:"sd:/edid.bin"})
:::

### SetHdmiMetadata(parameters As roAssociativeArray) As roAssociativeArray

Configures strings to be sent in the HDMI metadata. This method accepts an associative array with the following parameters:

- `spd_vendor` <font color="#704ae0">string</font>: The vendor string
- `spd_description` <font color="#704ae0">string</font>: The description string

This method returns an associative array, which can contain a single parameter:

- `restart_required` <font color="#704ae0">boolean</font>: A flag indicating whether the player must be rebooted for the metadata changes to take effect

### GetHdmiOutputStatus() As roAssociativeArray

Returns an associative array of Boolean and integer values if an HDMI output is currently connected to a display device. This method will return Invalid if the HDMI output is currently not connected to a display device. The associative array contains the following parameters:

- `output_present` <font color="#704ae0">boolean</font>: A flag indicating wheter the HDMI output is connected to a display device
- `output_powered` <font color="#704ae0">boolean</font>: A flag indicating whether the display device is on (i.e. RX powered)
- `EOTF` <font color="#704ae0">string</font>: A string indicating the current electro-optical transfer function (EOTF) used by the display. The following are possible values:
  - `"HDR (GAMMA)"`
  - `"SDR (GAMMA)"`
  - `"SMPTE 2084 (PQ)"`
  - `"HLG"`
  - `"unspecified"`
- `audio_bits_per_sample` <font color="#704ae0">int</font>: The number of bits per audio sample
- `audio_format` <font color="#704ae0">string</font>: The format of the audio output. A "PCM" value indicates that the player is sending decoded output.
- `audio_channel_count` <font color="#704ae0">int</font>: The number of audio channels in the output
- `audio_sample_rate` <font color="#704ae0">int</font>: The audio sample rate (in hertz)

:::hint{type="info"}
If an HDR video is playing, the following values will be retrieved from the video file: "max\_cll", "max\_fall", "red\_primary\_x", "red\_primary\_y", "green\_primary\_x", "green\_primary\_y", "blue\_primary\_x", "blue\_primary\_y", "white\_point\_x", "white\_point\_y", "min\_mastering\_luminance", "max\_mastering\_luminance".
:::

### GetHdmiInputStatus() As roAssociativeArray

Returns an associative array of Boolean and integer values if an HDMI input is currently connected to the device. This method will return Invalid if there is currently no HDMI input source. The associative array contains the following parameters:

- `device_present` <font color="#704ae0">boolean</font>: A flag indicating whether an HDMI input source is present
- `width` <font color="#704ae0">int</font>: The width of the source video
- `height` <font color="#704ae0">int</font>: The height of the source video
- `interlaced` <font color="#704ae0">boolean</font>: A flag indicating whether the video source is interlaced
- `frame_rate` <font color="#704ae0">float</font>: The framerate of the source video
- `pixelClock` <font color="#704ae0">float</font>: The pixel-clock rate of the source video (in MHz)
- `colorspace` <font color="#704ae0">string</font>: The color space of the source video
- `audio_type` <font color="#704ae0">string</font>: The audio encoding of the source video
- `audio_sampling_rate` <font color="#704ae0">int</font>: The audio sampling rate of the source video (in Hz)

### GetCompositorCrc() As Integer

Returns the CRC of the Y and Cb signals as a single integer.

### GetTxHdcpStatus() As roAssociativeArray

Returns an associative array indicating the current HDCP status of the HDMI output. The associative array currently contains a single key labeled state, which can have the following values:

- `"not-required"`: HDCP is not required by the player. HDCP is required by the player if the video has been decoded locally and needs protection or if the script has called the `forceHdcpOn()` method. Note that, even if the "not-required" value is returned, HDCP might still be active in passthrough mode if an upstream HDMI source (i.e. a device connected to the HDMI input port on the player) has requested it.
- `"authenticated"`: HDCP has been enabled and successfully negotiated.
- `"authentication-in-progress"`: HDCP has been enabled, but authentication has not been completed.
- `"authentication-failed"`: HDCP has been requested but could not be negotiated.

### ForceHdcpOn(force As Boolean) As Boolean

Forces HDCP authentication on the HDMI output if passed `True`. Passing `False` to this method will prevent forced authentication attempts with subsequent hotplug events. This method will return `False` if the player does not support HDCP or if `ForceHdcpOn()` has already been called with the same value.

### DisableHdcpRepeater(disable As Boolean) As Boolean

Prevents HDCP authentication from taking place on the HDMI input if passed `True`. The HDMI source will treat the player like any other non-HDCP authenticated HDMI sink. This method returns `False` if the HDCP state could not be changed, indicating that there's no HDMI input on the player or that HDCP has already been disabled.

### SetBackgroundColor(color As Integer) As Boolean

Specifies the background color using an `#rrggbb` hex value (8 bits for each color). Hex codes like #ffffff will cause an autorun error, so you should use the decimal of hex code (for example, the decimal of #ffffff is 16777215). You can get this value from a hex to decimal converter website: [Hexadecimal / Decimal Colors](https://www.mathsisfun.com/hexadecimal-decimal-colors.html).

### SetPowerSaveMode(video\_connector As String, power\_save\_mode As Boolean) As Boolean

The power\_save\_mode paramater disables HDMI output, the syncs for VGA output, and the DAC output for component video. The absence of a signal will cause some monitors to go into standby mode.&#x20;

The optional video\_connector parameter supports specifying different HDMI outputs and should only be used with multi-output players.

### IsAttached(connector As String) As Boolean

Returns `True` if the specified video connector is attached to an output device (i.e. the display EDID can be read successfully). This method can be passed the following parameters (note that they are case sensitive):

- `"hdmi"`
- `"vga"`

### HdmiAudioDisable(disable As Boolean) As Boolean

Disables audio output if True. This method is set to False by default.

### SetMultiscreenBezel(x\_pct As Integer, y\_pct As Integer) As Boolean

Adjusts the size of the bezel used in calculations for multiscreen displays, allowing for users to compensate for the width of their screen bezels. The calculations for the percentages are as follows:

`x_percentage = (width_of_bezel_between_active_screens / width_of_active_screen) * 100`

`y_percentage = (height_of_bezel_between_active_screens / height_of_active_screen) * 100`

The bezel measurement is therefore the total of the top and bottom bezels in the y case, or the left and right bezels in the x case. When this value is set correctly, images spread across multiple screens take account of the bezel widths, leading to better alignment of images.

### SaveEdids(filename As String) As Boolean

Saves the EDID information of the display(s) connected via HDMI and/or VGA. The EDID fields are saved sequentially as raw binaries into the specified file. The EDID sets are two 2kb each, resulting in a maximum file size of 4kb. This method returns True upon success and False upon failure.

### GetEdidIdentity(video\_connector As Object) As roAssociativeArray

Returns an associative array with EDID information from a compatible monitor/television. `video_connector` can be a string or a boolean:&#x20;

- Pass `True` to specify EDID over HDMI
- Pass a string to specify the HDMI port from which to get the EDID information
- Pass `False` to specify EDID over VGA

These are the possible parameters returned in the associative array:

- `serial_number_string`
- `year_of_manufacture`
- `monitor_name`
- `manufacturer`
- `text_string`
- `serial_number`
- `product`
- `week_of_manufacture`
- unstable

The system will generate an *roHdmiEdidChanged&#x20;*&#x65;vent when an HDMI cable is hotplugged and the EDID information changes. Calling `GetEdidIdentity(true)` at this point retrieves the new EDID information.

**Usage Example**

Specify the HDMI port you want to get the EDID from. For example:&#x20;

:::BlockQuote
GetEdidIdentity(“HDMI-2”)
:::

### SetMpcdi(parameters As roAssociativeArray) As Boolean

Enables MPCDI using the passed parameters. See [this page](docId\:W9QxxBdGzv8_kjUzeUHDU) for more information about configuring MPCDI on BrightSign players.

### SetSyncDomain(domain As String) As Boolean

Enables Genlock synchronization on the specified *roSyncManager&#xA0;*&#x64;omain. To disable Genlock on the domain, pass an empty string to this method. To reconfigure an active Genlock synchronization, call `SetSyncDomain()` again using the domain name of the new or edited *roSyncManager&#x20;*&#x69;nstance.

# ifMessagePort

### SetPort(port As Object) As Void

Posts events to the attached message port

# ifUserData

### SetUserData(user\_data As Object)

Sets the user data that will be returned when events are raised.

### GetUserData() As Object

Returns the user data that has previously been set via `SetUserData()`. It will return Invalid if no data has been set.

# "Auto" Video Mode

If the video mode is set to "auto," BrightSign players will use the algorithm below to determine the best video mode to use based on connected hardware, unless they are XD5 or HD5 players. “Auto” on those players will set to the best general resolution that can cope with any type and combination of content of for these platforms, not the highest resolution. For example, the “auto” setting on an XD5 or HD5 will be set to HD, not 4K.&#x20;

1. Try HDMI: If HDMI is attached, use the highest-resolution mode (as reported by the monitor) that the player supports.
2. Default to 640x480x60p.
3. If an HDMI hotplug event occurs at any point, recheck the monitor EDID to determine if the highest-resolution mode has changed. If it has changed, reboot the player and use the new video mode.

# Selecting Decoders for Playback

The system software selects which video decoder to use based on the resolution probed from the video file. In standard mode, it will attempt to select the decoder that has the closest maximum supported resolution (i.e. 1920x1080 for the HD decoder and 3840x2160 for the 4K decoder), without exceeding that maximum resolution. If a decoder has been configured for Mosaic mode, it will match the video resolution against the specified `timeslice_mode` instead. If both decoders support the same maximum resolution, you can select a decoder by matching the z-order of the *roVideoPlayer&#x20;*&#x69;nstance (set using the `ToFront()` and `ToBack()` methods) with the z-order of the decoder (set using the *roVideoMode.SetDecoderMode()&#x20;*&#x6D;ethod).

:::hint{type="info"}
Series 5 players don’t need Mosaic mode to decode multiple videos if the videos have a low pixel count and do not contain a more total pixels than the Series 5 video pipeline can process.
:::

You can also select the decoder manually. First, configure the decoder(s) using the *roVideoMode.SetDecoderMode()&#x20;*&#x6D;ethod. Then, use the `friendly_name` specified when calling the method to designate a decoder to use for video playback.

To select a decoder in BrightScript, pass an associative array to the *roVideoPlayer.PlayFile()&#x20;*&#x6D;ethod containing the `decoder:[friendly_name]` parameter:

:::BlockQuote
PlayFile(\{filename:"text\_1.mov", decoder:"main-video"})
:::

To select a decoder for HTML video, include the `decoder:[friendly_name]` property with the `hwz` attribute:

:::BlockQuote
\<video hwz="decoder\:main-video;"> \</video>
\<video hwz="decoder\:sd-video;"> \</video>
:::

The `max_usage`of a decoder determines how many video players can be assigned to the decoder using the system software algorithm described above—video players beyond the `max_usage` limit may be assigned to another decoder or not displayed at all. On the other hand, if you manually assign video players using the `friendly_name` of the decoder, you can assign more video players to the decoder than the `max_usage` limit, but this may cause unpredictable video-display behavior.
