Change the Kodi TV Guide / Programme Listing Font Size under Kodi 17 / Krypton

System Requirements:

  • Kodi Krypton, 17.0, 17.1, 17.2, 17.3, 17.4

The Problem:

If you are a Kodi user, you will have no doubt noticed that with the change in version from 16 to 17, the XBMB Foundation changed the default skin from Confluence to Estuary. While Estuary is a nice looking skin, with Kodi 17, the programme has become more limited in the font customisation’s that are available through the skin/UI settings menu. Where as under previous versions, you had some pre-defined normal, large, extra large style choices, under version 17 all you can do is switch between default font and the system default font under the guise of it having higher legibility.

If your use case is such that you have a TV that is a long way away, or more importantly, if you need to support a user with accessibility needs who relied on Kodi’s ability to resize the text size in order to navigation the system, then you are somewhat out of luck at the current time.

This article outlines how to change the font size on the Kodi TV Guide/Programme Listings page by modifying the UI skin configuration files directly. It is also intended as a very high level illustration of how to modify other UI elements.

The Fix

The process of changing the font size is fairly easy, one you know what you are doing. The process of changing the font size is a three step process

  1. Find the correct configuration file
  2. Establish what your legal parameter values are
  3. Edit the configuration file in the correct place

Find the correct configuration file

The Estuary skin configuration and interface files are located at .\addons\skin.estuary\, relative to the install path. For example, on Windows, this is most likely:

C:Program Files (x86)\Kodi\addons\skin.estuary\

The key repository that you need to review is the xml folder (C:Program Files (x86)\Kodi\addons\skin.estuary\xml\).

In this folder, you will find the layout parameter files for Kodi. For the purposes of this guide, the file that we need to edit is MyPVRGuide.xml. You need to identify the correct file for the section that you want to edit in order to proceed.

If you are running Windows and User Account Control (UAC) is enabled, copy the file to your desktop and then make a backup copy of it. If you try and edit the fire directly under Program Files (x86) you will get an access denied error when you attempt to save the changes.

Establish what your legal parameter values are

Note: If you just want to edit the font and don’t care about the ‘how’, you can skip this section. Just realise that you cannot put any value that you want in the font size field when editing the skin.

For the font size, Kodi does not use an integer or point value for the font size (12, 36, 48 etc). Instead, it uses an XML enumerable type definition in its DTD representing allowed values. This means that you need to know what the allows values are and that if you want to use a non-standard value, you have to perform a far more complex series of edits to allow Kodi to support a new font size. As this change is something that you will likely need to make every time Kodi receives an official update, I strongly advise not attempting to create your own DTD value and consequently how to do it will remain beyond the scope of this article.

In order to ascertain what the allowed values are, I used a Command Prompt string search to look for all instances of “>font” under the XML folder.

The following command

findstr /s /l ^>font "c:\Program Files (x86)\Kodi\addons\skin.estuary\xml\*.xml"

Yielded the following block of definitions after de-duplication

<name>font10</name>
<name>font12</name>
<name>font13</name>
<name>font14</name>
<name>font25_narrow</name>
<name>font27</name>
<name>font27_narrow</name>
<name>font37</name>
<name>font45</name>
<name>font60</name>
<name>font_clock</name>
<name>font_flag</name>
<name>font20_title</name>
<name>font25_title</name>
<name>font30_title</name>
<name>font32_title</name>
<name>font36_title</name>
<name>font45_title</name>
<name>font52_title</name>
<name>font_MainMenu</name>

These fontXXXXXX values represent the allowed enumerate values that the skin ill accept. Anything else will be ignored and substituted with a default (font12).

Edit the configuration file in the correct place

Go back to the skin .xml file you copied to your desktop. Open the file in Notepad or your preferred text editor.

You now need to find the section that controls the UI element that you want to modify. Read through it looking for clues in the XML naming and if all else fails, it is a case of trial and error to find it (unless you want to go and read the Kodi skin documentation).

If you want to edit the TV Guide programme listing entry under Kodi 17.4, then look for the following section:

<itemlayout height="62" width="60">
<control type="image" id="2">
<width>58</width>
<height>58</height>
<texture border="3" fallback="windows/pvr/epg-genres/0.png">$INFO[ListItem.Property(GenreType),windows/pvr/epg-genres/,.png]</texture>
</control>
<control type="label" id="1">
<left>6</left>
<top>0</top>
<width>50</width>
<height>36</height>
<aligny>center</aligny>
<font>font12</font>
<label>$INFO[ListItem.Label]</label>
</control>
<control type="image">
<left>6</left>
<top>35</top>
<width>20</width>
<height>20</height>
<texture>$VAR[PVRTimerIcon]</texture>
</control>
</itemlayout>

The <font>font12</font> line controls the text size. In the use case that I had, I found that changing it to <font>font30_title</font> was acceptable. Remember: You can only use one of the lookup values shown in the section above and as this is XML, it is case sensitive!

Change the value, save the file and copy it back to the XML folder. Now (re)start Kodi to view your changes.

If you edit this value, you will notice that when you highlight the programme in the TV guide, the highlight goes back to a smaller font size, while non-highlighted programme’s will display in the new, larger font size. This is because the highlight is controlled by a different section. To change the highlight, go back to the .xml file in Notepad and edit the following section accordingly:

<focusedchannellayout height="62" width="350">
<control type="label">
<left>2</left>
<top>-2</top>
<width>75</width>
<height>60</height>
<font>font12</font>
<label>$INFO[ListItem.ChannelNumberLabel]</label>
<textcolor>button_focus</textcolor>
<align>center</align>
<aligny>center</aligny>
</control>
<control type="label" id="1">
<left>68</left>
<top>-2</top>
<width>350</width>
<height>60</height>
<font>font12</font>
<label>$INFO[ListItem.ChannelName]</label>
<textcolor>button_focus</textcolor>
<aligny>center</aligny>
<textoffsetx>10</textoffsetx>
</control>
</focusedchannellayout>

Note: in version 17.4 this is immediately ABOVE the section you just edited!

Change font12 to match your new value, save, put the file back in the XML folder and (re)start Kodi. The highlight font size should now match the rest of the Programme Guide.

Once you know where to go, the process it fairly easy. Do keep pin mind though that when you update Kodi to a new version, it will overwrite your changes and you will need to go back in and edit the font sizes once again. Hopefully the XBMC UI team will get around to restoring some degree of internal configurability for this soon, as not everyone in this world has 20:20 vision!

Hyper-V Discrete Device Assignment (DDA) with a TV Tuner (Hauppauge HVR-4400)

System Requirements:

  • Windows Server 2016
  • Hauppauge HVR-4400 PCIe Tuner

The Problem:

I am a DVBLink user. DVBLink does not play nicely with Windows Service and consequently it wants to run on a client OS. This means that I have lots of server hardware running server Operating Systems and one device with 4 TV Tuners in it running Windows 10.

With the release of Windows Server 2016 came the promise of VMWare like PCIe Pass-through, allowing physical devices on the PCI bus to be attached to VMs. The plan is to attach the PCIe TV Tuner and attempt to get DVBLink working in a VM so that the physical unit can be decommissioned (saving the power bill).

More Info

As part of the process, I was considering building a new server at the start of 2017 to perform a consolidation against. The Windows 10 DVBLink machine would be one consolidated devices onto more powerful modern hardware. I would also need new TV Tuners as only 2 of the 4 in the DVBLink TV Server is PCIe, the rest are PCI. Again, there are opportunities to consolidate that into fewer PCIe devices too.

The driver for the new server was Hyper-V PCIe Pass-through, or “Discrete Device Assignment” (DDA) as Microsoft are calling it. It is however quite difficult to find out whether BIOS firmware supports the proper implementations of I/O-MMU VT-d to permit it, making the purchase a risk. Equally, there is no guarantee that DDA will work with a TV Tuner.

Consequently, I decided to borrow a dual CPU Dell PowerEdge R630 to perform the experiment as there were several reports on-line that the R6xx and R7xx have the proper VT-d and SR-IOV feature set for this type of activity. Well done Dell (why don’t you advertise this?!).

After updating firmware, adding the TV Tuner and installing Windows Hyper-V Server 2016 on the machine, the first step was to – as an experiment – attempt to install the TV Tuner drivers on Windows Server 2016 (which errored). After that it was time to run the DDA Survey Script from Microsoft.

Download: DDA Survey Script (GitHub)

 

This was promising. The script found two devices that it stated were capable of being used with DDA

PERC H730 Mini
Express Endpoint -- more secure.
And its interrupts are message-based, assignment can work.
PCIROOT(0)#PCI(0100)#PCI(0000)

and

Hauppauge WinTV HVR-4400 (Model 121xxx, Hybrid DVB-T/S2, IR)
Express Endpoint -- more secure.
And it has no interrupts at all -- assignment can work.
PCIROOT(0)#PCI(0200)#PCI(0000)

The next step was to dismount the device from the Hypervisor and make it available to Hyper-V

# Find the HVR-4400
$pnpdevs = Get-PnpDevice -PresentOnly | Where-Object {$_.Class -eq "Media"} | Where-Object {$_.Service -eq "HCW85BDA"}# ... or if you know the hardware ID
$pnpdevs = Get-PnpDevice -PresentOnly | Where-Object {$_.InstanceId -eq "PCI\VEN_14F1&DEV_888
0&SUBSYS_C1080070&REV_04\4&39CDA168&0&0010"}foreach ($pnpdev in $pnpdevs) {
Disable-PnpDevice -InstanceId $pnpdev.InstanceId -Confirm:$false
Write-Host 'Device ' $pnpdev.InstanceId ' Disabled. NOTE: If this hangs, reboot and try again'
$instanceId = $pnpdev.InstanceId
$locationpath = ($pnpdev | get-pnpdeviceproperty DEVPKEY_Device_LocationPaths).data[0]
Write-Host 'Dismounting Device At: ' $locationpath ' (' $instanceId ')'
Dismount-VmHostAssignableDevice -locationpath $locationpath
Write-Host $locationpath
}

Initially, it hung PowerShell (and the system) so I had to hard reset the server. In this instance it was in fact necessary to reboot after issuing

Disable-PnpDevice

After trying again and rebooting the Dismount-VmHostAssignableDevice failed with

dismount-vmhostassignabledevice : The operation failed.
The manufacturer of this device has not supplied any directives for securing this device while exposing it to a
virtual machine. The device should only be exposed to trusted virtual machines.
This device is not supported when passed through to a virtual machine.
The operation failed.
The manufacturer of this device has not supplied any directives for securing this device while exposing it to a
virtual machine. The device should only be exposed to trusted virtual machines.
This device is not supported and has not been tested when passed through to a virtual machine. It may or may not
function. The system as a whole may become unstable. The device should only be exposed to trusted virtual machines.
At line:1 char:1

It would not proceed past this point. The trick was to change the line to

Dismount-VmHostAssignableDevice -locationpath $locationpath -Force

The next step was to ensure that the VM’s Automatic Stop Action was set to anything other than “Save”

Set-VM -Name “10-TEST” -AutomaticStopAction Shutdown

… and at this point it was simply a case of creating a VM and assigning the device

Add-VMAssignableDevice -LocationPath “$locationpath” -VMName “10-Test”

At which point the device immediately popped up in Device Manager under Windows 10 in the Generation 2 VM

DDA PCIe Passthrough in Device Manager

…. before the VM blue screened a few seconds later.

Blue Screen of Death

I tried to use several versions of the HVR-4400 driver that I could find and it made no difference. The VM would crash whenever it attempted to talk to the card. The Hypervisor itself did not seem to be impacted by the Blue Screen event and itself did not crash.

I also tried fully removing the device from the Hypervisor using DEVCON and clearing out the driver using pnputil. Superficially, this action made it worse as the VM wouldn’t boot at all now if it had a driver on-file for the TV Tuner. Before it would at least boot.

So this project was a failure and I will not be investing in new server hardware just yet. I’ll wait to see if Microsoft improve the feature set as allegedly this type of insanity (and yes, it is insane) is possible in VMWare. I do not want to change away from Hyper-V at the current time though, so I will have to stick with a client machine as a service.

This does not mean of course that this cannot work in Hyper-V. The HVR-4400 is a card from 2011/2012. So it is not exactly new hardware. PCIe TV Tuners designed to modern electrical standards and for use on PCIe 3.0 bus architectures may provide better interoperability out of the box. I just don’t have any other cards to test with and am in a bit of a chicken and egg situation over wanting to invest in new cards and servers unless I know they will work nicely together.

If you are interested in this too and would like me to have a go testing your hardware, please get in touch via HPC:Factor.

Creating a Windows XP Service Pack 3 Integrated CD for Windows XP Media Center Edition

System Requirements:

  • Windows XP Media Center Edition 2004
  • Windows XP Media Center Edition 2005

The Problem:

When you create a slipstreamed installation media for Windows XP Media Center Edition you receive the following error message at approximately “26 minutes” until completion during the Windows XP Professional Edition setup routine.

Files Needed
The file ‘ehiEPG.dll’ on Windows XP Professional CD 2 is needed.
Type the path where the file is located, and then click OK.

Slipstream ehiEPG.dll error

If you check the installation media, the file does not exist and you will be unable to install the Media Centre module with the Windows XP installation.

More Information:

If you check the Windows XP Slipstreamed Media, you will not be able to find the file ehiEPG.dll or ehiEPG.dl_ on the disc set. If you are looking for a short answer to your problem, here it is:

  • Windows XP Media Center 2004 – You can slipstream
  • Windows XP Media Center 2005 – You cannot slipstream

 

This one took me a frustratingly large amount of time to work out, but here is a rundown of how I have come to this conclusion.

 

When you slipstream XP SP3 onto Tablet PC Edition Media (which is the same as the MCE media minus the Sonic and Plus CAB’s), the Tablet PC components on CD 2 are updates as part of the slipstream. When you perform the same action on a MCE 2005 media set, no changes are made to the cmpnents\mediactr\i386 folder on disc 2.

So what about this ehiEPG.dll file?

The Media Centre installer is conducted through a sub-file in the i386 folder called: MEDCTROC.IN_

if you expand this file before you perform the slipstream with SP3 (using expand <path>\MEDCTROC.IN_ c:\MEDCTROC.INI) and then do the same after the slipstream you will come up with a completely different set of results (shown in the table below).

MCE 2005 SP2 (Microsoft) MCE 2005 SP3 (Slipstreamed)
Arch.jpg Arch.jpg
AspectRatio16x9.wmv = 1 AspectRatio16x9.wmv =1
AspectRatio4x3.wmv = 1 AspectRatio4x3.wmv =1
bdatunepia.dll = 1 bdatunepia.dll = 1
bdatunepia.ldo = 1 bdatunepia.ldo = 1
BigWave.jpg = 1 BigWave.jpg = 1
Brightness.wmv = 1 Brightness.wmv =1
CBVAFilter.dll = 1
ColorTint.wmv = 1 ColorTint.wmv =1
Contrast.wmv = 1 Contrast.wmv =1
DebugSvc.dll = 1 DebugSvc.dll = 1
down_gem.png = 1 down_gem.png = 1
down_otto.png = 1 down_otto.png = 1
ehchsime.dll = 1 ehchsime.dll = 1
ehCIR.dll = 1 ehCIR.dll = 1
ehCIR.ird = 1 ehCIR.ird = 1
ehcir.ldo = 1 ehcir.ldo = 1
ehCIRcl.dll = 1
EhCM.dll EhCM.dll
ehcm.ldo ehcm.ldo
ehcommon.dll = 1 ehcommon.dll = 1
ehcommon.ldo = 1 ehcommon.ldo = 1
EhDebug.dll = 1 EhDebug.dll = 1
ehdrop.dll = 1 ehdrop.dll = 1
ehentt.dll = 1 ehentt.dll = 1
ehepg.dll = 1 ehepg.dll = 1
ehepg.ldo = 1 ehepg.ldo = 1
ehepgdat.dll = 1 ehepgdat.dll = 1
ehepgdat.ldo = 1 ehepgdat.ldo = 1
ehepgdec.dll = 1 ehepgdec.dll = 1
ehepgnet.dll = 1 ehepgnet.dll = 1
ehGLID.dll = 1 ehGLID.dll = 1
ehiEPG.dll = 1
ehiepg.ldo = 1
ehiExtens.dll = 1 ehiExtens.dll = 1
ehiMsgr.dll = 1
ehIntro.wmv = 1 ehIntro.wmv =1
ehiPlay.dll = 1 ehiPlay.dll = 1
ehiplay.ldo = 1 ehiplay.ldo = 1
ehiProxy.dll = 1 ehiProxy.dll = 1
ehiproxy.ldo = 1 ehiproxy.ldo = 1
ehiTuner.dll = 1
ehituner.ldo = 1
ehiuserxp.dll = 1 ehiuserxp.dll = 1
ehiuserxp.ldo = 1 ehiuserxp.ldo = 1
ehiVidCtl.dll = 1 ehiVidCtl.dll = 1
ehividctl.ldo = 1 ehividctl.ldo = 1
ehiwmp.dll = 1 ehiwmp.dll = 1
ehiwmp.ldo = 1 ehiwmp.ldo = 1
ehiwuapi.dll = 1
ehjpnime.dll = 1 ehjpnime.dll = 1
ehkeyctl.dll = 1
ehmsas.exe = 1 ehmsas.exe = 1
ehPlayer.dll = 1 ehPlayer.dll = 1
ehProxy.dll = 1 ehProxy.dll = 1
ehRec.exe = 1 ehRec.exe = 1
ehRecObj.dll = 1 ehRecObj.dll = 1
ehrecobj.ldo = 1 ehrecobj.ldo = 1
ehRecvr.exe = 1
ehres.dll = 1 ehres.dll = 1
ehreschs.dll = 1 ehreschs.dll = 1
ehresde.dll = 1 ehresde.dll = 1
ehresfr.dll = 1 ehresfr.dll = 1
ehresit.dll = 1
ehresja.dll = 1 ehresja.dll = 1
ehresko.dll = 1 ehresko.dll = 1
ehresnl.dll = 1
ehSched.exe = 1 ehSched.exe = 1
ehshell.exe = 1 ehshell.exe = 1
ehshell.ldo = 1 ehshell.ldo = 1
ehsqdb20.dll = 1 ehsqdb20.dll
ehsqqp20.dll = 1 ehsqqp20.dll = 1
ehsqse20.dll = 1 ehsqse20.dll = 1
ehtray.exe = 1 ehtray.exe = 1
ehui.dll ehui.dll
ehuihlp.dll = 1 ehuihlp.dll = 1
EpgTOS.txt = 1
Fish.jpg Fish.jpg
Freestyl.jpg = 1 Freestyl.jpg = 1
gacutil.exe = 1
GEMMAS~1.MCL = 1 GEMMAS~1.MCL =1
mcdftreg.inf = 1 mcdftreg.inf = 1
MCETuningOverrides.xml = 1
mcrmgr.dll = 1
mcrmgr.exe = 1
mcskin.wmz = 1 mcskin.wmz = 1
medcthlp.cab = 1 medcthlp.cab = 1
medctrro.exe = 1 medctrro.exe = 1
Microsoft.MediaCenter.dll = 1
Otto.mcl Otto.mcl =1
Positioning16x9.wmv = 1 Positioning16x9.wmv =1
Positioning4x3.wmv = 1 Positioning4x3.wmv =1
PositioningOS16x9.wmv = 1
PositioningOS4x3.wmv = 1
RegisterMCEApp.exe = 1
RGBBalance.wmv = 1 RGBBalance.wmv =1
Rio.jpg = 1 Rio.jpg = 1
segmcr.ttf = 1
segmcsb.ttf = 1
Sharpness.wmv = 1 Sharpness.wmv =1
snchk.exe = 1
SS2.dvr-ms = 1
SS51.dvr-ms = 1
winxpfs.jpg = 1 winxpfs.jpg = 1
WMM2DVR.DLL = 1
WMM2ERES.dll = 1
WMM2EXT.dll = 1
WMM2FXPZ.DLL = 1
WMM2FXPZ.XML = 1

 

The differences between the two installation file sets is quite clear, there are many files missing from the SP3 installer list and a hand full of files are new on the SP3 list. The presence of new file is however understandable because of new files included in hot fixes to Media Centre Edition since XP SP2 was released in 2004. Where are the files though?

Extracting the SP3 installer reveals the files to be located within the Service Pack hierarchy in the location:
\i386\root\cmpnents\mediactr\i386

My mistake here was not examining the files closer, because I assumed that perhaps there had been an issue with the slipstream script and the files had not been copied across to the delivery folder for disc 2 during the slipstream.

To test this theory, I halted the Virtual Machine that I had asking me for ehiEPG.dll, copied the contents of service pack \i386\root\cmpnents\mediactr\i386 into \cmpnents\mediactr\i386 of my slipstreamed build folder and recreated the disc 2 ISO image.

Sure enough, the Virtual Machine installation took one look at the disc and was suddenly happy again. Sounds good?

So I abandoned the install and started again to ensure that I was not mixing file versions. The install got to 26 minutes, no problems, the install got to 10 minutes, no problems. The install came up with OOBE and still no problems.

On the start menu there was Media Center link and in clicking it the MCE initiator grumbled about the graphics card not being compatible with MCE (this was Virtual PC after all) but sure enough, MCE loaded.

I immediately hit Windows Update and was offered nothing more than:

  • Internet Explorer 7.0
  • Windows Malicious Software Removal Tool May 2008
  • 923789 – Update for Adobe Flash Player

So it looked like it had worked… until after a couple of minutes of fiddling I realised that something looked very, very wrong (and no, not just the hashed up low-depth graphics). Firstly, the plus pack and sonic plugins were missing from the system, this included the Royal XP skin that is supposed to be included with MCE.

Secondly, not being familiar with MCE for XP having never actually bothered to install the thing, it took me a few minutes to realise that this was so radically different from the Vista version that it looked more like the third party MyCinema Media Centre than screenshots that I have seen of the XP one.

Windows XP Media Centre Edition About Screen

… 5.1.2600 (XP) 5512 (SP3’s build number) it worked!

Oh, wait a minute, that says “Windows XP Media Center Edition 2004

So I checked the disc’s (that I had never used before). They said MCE 2005… but a quick google told me that 5.1.2700 was MCE 2005 and that no references to MCE 2004 had even heard of 5.1.2600.5512.

So I checked Disc 2 \cmpnents\mediactr\i386\mediactr.cab pulled out ehshell.ex_, inflated it and checked the version number: 5.1.2700.2180:
5.1 (XP) 2700 (MCE 2005) 2180 (XP SP2’s build number)

I had Media Center Edition 2005.

Conclusion

I started with MCE 2005 and wound up with MCE 2004. Confused?

It then dawned on me that the SP3 redistributable must not have any awareness of MCE 2005 at all. The reason why the installer from a Slipstreamed MCE 2005 disc is asking for ehiEPG.dll is because when you slipstream, it doesn’t get the files wrong, it just assumes that you are using Windows XP Media Center 2004 and integrates the updater script for the patched version of MCE 2004!

Once I had given it the MCE 2004 source files (provided in the SP3 redist) it was more than happy to install and deliver MCE 2004 for me in fully working order.

So as far as I am concerned, if you have a MCE 2004 installation set, you can create a MCE 2004 slipstreamed media (although I do not know if the slipstream script will populate the updates onto disc 2 for you or not – I am assuming that it will. If however you have MCE 2005, then quite frankly you cannot slipstream MCE 2005 SP3 as there is nothing to slipstream.

Presumably if you reintroduce the MCE 2005 MEDCTROC.IN_ file after slipstreaming the base OS, you will be able to load a SP3 base OS and a clean SP2 level MCE 2005 – but I have not tested this hypothesise.

Experiment: Using a SoundBlaster Live! Drive II with an Audigy 2 ZS

System Requirements:

  • Windows 2000, XP, Vista
  • SoundBlaster Audigy 2 ZS
  • Live Drive II (Live!Drive 2)

The Problem:

I happened to have an Audigy 2 ZS with the Audigy Platinum Live Drive header, and a Live!Drive 2 from a SoundBlaster Live! Platinum.

The Question: could it work against the Audigy 2?

More Info:

Nope. Although the cable and connectors pin out (be it in reverse, requiring a 180 degree rotation of the Live Drive 2 bus cable) and the system starts, sound functions from the Audigy PCI card work correctly. The outputs on the Live Drive II emit a meaningless buzzing, and no interfaces on the Live Drive are able to function or are acknowledged by the Creative driver.

I tried, we failed.