How to configure resolution in bootimage

Background

When it comes to resolutions there are a few different things to keep in mind. In the older 2.x firmware the user had the choice of choosing a preferred resolution, in 3.x this option was removed from firmware to remove confusions if an end customer chooses a resolution in firmware and then the portal sets something else. Either way this tutorial will focus on how we can configure a default resolution that the box should use if there are no other settings being made by the portal and/or stored in flash

For the 3.x firmware you have the option of specifying the default resolution by including an iip in your bootimage. The name of the iip to be included is

kreatv-option-default-video-settings

Usage of kreatv-option-default-video-settings

The IIP accepts a few different arguments on how one can configure the default resolutions. With this IIP you can choose to set the resolution as parameters or by specifying an xml file to be used, this will be covered further down. The different parameters are:
ColorSystem
ScartLoopThrough
HdmiMode
HdmiColor
CompMode
CompColor
ScartMode
file

ColorSystem

ColorSystem Values: (Default PAL-B)

ColorSystem= TToiColorSystem
NTSC-M COLOR_SYSTEM_NTSC_M
NTSC-J COLOR_SYSTEM_NTSC_J
PAL-B COLOR_SYSTEM_PAL_B
PAL-M COLOR_SYSTEM_PAL_M
PAL-N COLOR_SYSTEM_PAL_N
PAL-NC COLOR_SYSTEM_PAL_NC

ScartLoopThrough

ScartLoopThrough values: (Default DISABLED)

ScartLoopThrough= TToiValueMode
NO NO_VALUE_MODE
ENABLED VALUE_MODE_ENABLED
DISABLED VALUE_MODE_DISABLED

HdmiMode

HdmiMode values: (Default 576p50)

VideoMode= TToiVideoMode
OFF NO_VIDEO_MODE
480i60 VIDEO_MODE_480I60
576i50 VIDEO_MODE_576I50
480p60 VIDEO_MODE_480P60
576p50 VIDEO_MODE_576P50
720p50 VIDEO_MODE_720P50
720p@60 VIDEO_MODE_720P60
1080i50 VIDEO_MODE_1080I50
1080i@60 VIDEO_MODE_1080I60
1080p@23976 VIDEO_MODE_1080P23976
1080p@24 VIDEO_MODE_1080P24
1080p@25 VIDEO_MODE_1080P25
1080p@29970 VIDEO_MODE_1080P29970
1080p@30 VIDEO_MODE_1080P30
1080p@50 VIDEO_MODE_1080P50
1080p@59940 VIDEO_MODE_1080P59940
1080p@60 VIDEO_MODE_1080P60

HdmiColor

HdmiColor values: (Default SRGB)

HdmiColor= TToiColorSpace
SRGB DIGITAL_COLOR_SPACE_SRGB
YCBCR_444 DIGITAL_COLOR_SPACE_YCBCR_444
YCBCR_422 DIGITAL_COLOR_SPACE_YCBCR_422
XVYCC DIGITAL_COLOR_SPACE_XVYCC

CompMode

CompMode values: (Default 576p50)

VideoMode= TToiVideoMode
OFF NO_VIDEO_MODE
480i60 VIDEO_MODE_480I60
576i50 VIDEO_MODE_576I50
480p60 VIDEO_MODE_480P60
576p50 VIDEO_MODE_576P50
720p50 VIDEO_MODE_720P50
720p@60 VIDEO_MODE_720P60
1080i50 VIDEO_MODE_1080I50
1080i@60 VIDEO_MODE_1080I60
1080p@23976 VIDEO_MODE_1080P23976
1080p@24 VIDEO_MODE_1080P24
1080p@25 VIDEO_MODE_1080P25
1080p@29970 VIDEO_MODE_1080P29970
1080p@30 VIDEO_MODE_1080P30
1080p@50 VIDEO_MODE_1080P50
1080p@59940 VIDEO_MODE_1080P59940
1080p@60 VIDEO_MODE_1080P60

CompColor

CompColor values: (Default YPBPR, only one option available.)

CompColor= TToiColorSpace
YPBPR ANALOG_COLOR_SPACE_YPBPR

ScartMode

ScartMode values: (default CVBS)

ScartMode= TToiScartMode
CVBS SCART_MODE_CVBS
S-VIDEO SCART_MODE_YC
RGB SCART_MODE_RGB_CVBS

File

For testing purposes one can include an xml file instead of using the above arguments, this isn't something that we encourage, but for the sake of completeness we will add a few example files which could be included as xml files to the IIP. To use an xml file add the following line to your bootimage config file: kreatv-option-default-video-settings:file=/extra/videosettings.xml

Example videosettings file

As there are some limitations on the possible video setting combinations this part will show a few settings that might be of interest.

HDMI and Component at 720p with SCART set to CVBS

A quite common default video setting could be this one that has video on all outputs.
<?xml version="1.0"?>
<VideoOutputConfiguration version="1">
  <ColorSystem>COLOR_SYSTEM_PAL_B</ColorSystem>
  <ScartLoopThrough>VALUE_MODE_DISABLED</ScartLoopThrough>
  <Outputs>
    <Output>
      <Id>0</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_HDMI</ConnectionType>
      <Mode>VIDEO_MODE_720P50</Mode>
      <ColorSpace>DIGITAL_COLOR_SPACE_SRGB</ColorSpace>
    </Output>
    <Output>
      <Id>1</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_COMPONENT</ConnectionType>
      <Mode>NO_VIDEO_MODE</Mode>
      <ColorSpace>ANALOG_COLOR_SPACE_YPBPR</ColorSpace>
    </Output>
    <Output>
      <Id>2</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_SCART</ConnectionType>
      <ScartMode>SCART_MODE_RGB_CVBS</ScartMode>
    </Output>
  </Outputs>
</VideoOutputConfiguration>

HDMI at 720p, SCART set to RGB and Component set to off

According to possible video setting combinations one can see that there're some limitations when using RGB on SCART, so for those who favor RGB on scart might use this configuration to have best videoquality on scart and still have an output on HDMI.
<?xml version="1.0"?>
<VideoOutputConfiguration version="1">
  <ColorSystem>COLOR_SYSTEM_PAL_B</ColorSystem>
  <ScartLoopThrough>VALUE_MODE_DISABLED</ScartLoopThrough>
  <Outputs>
    <Output>
      <Id>0</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_HDMI</ConnectionType>
      <Mode>VIDEO_MODE_720P50</Mode>
      <ColorSpace>DIGITAL_COLOR_SPACE_SRGB</ColorSpace>
    </Output>
    <Output>
      <Id>1</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_COMPONENT</ConnectionType>
      <Mode>NO_VIDEO_MODE</Mode>
      <ColorSpace>ANALOG_COLOR_SPACE_YPBPR</ColorSpace>
    </Output>
    <Output>
      <Id>2</Id>
      <ConnectionType>VIDEO_CONNECTION_TYPE_SCART</ConnectionType>
      <ScartMode>SCART_MODE_CVBS</ScartMode>
    </Output>
  </Outputs>
</VideoOutputConfiguration>