Taking out backgrounds behind text

Keith Ng

My church runs EasyWorship v6 for projection control - EW makes it easy with a song database and you can drag and drop PowerPoint presentations into the schedule which can be played using the program.

We’ve used it for many years but temporarily switched to using PowerPoint for lyric slides instead of the built-in song database due to an issue with the positioning of the lyrics. Due to COVID the worship team have had to move from a collapsible stage at ground level closer to the audience to the real stage - which unfortunately means that they’re also now in the way of the lyrics display. It was necessary to move the lyrics to a very high position above their heads in order for the audience to be able to see the lyrics - we have now worked out that this can actually be achieved with a song theme in EasyWorship.

But one of the other struggles is live streaming and how to display lyrics and the input from the camera. At first, we put them side by side in a scene - but that was criticised by some that thought the camera was too small. We needed a way to overlay the lyrics over the camera input. What we found was that we could actually use a colour key or chroma key in OBS to overlay the lyrics over a full size camera display. That meant that both the lyrics and the camera were bigger and easier to see.

But that setup relies on the front of house lyrics display design to be identical to the one that goes to OBS and out to the live stream. What if we wanted to put backgrounds in the front of house display without affecting the existing live streaming layout for lyrics? We couldn’t use colour/chroma key to cut the text out as easily if there were backgrounds on it.

I did some research and found that it was actually possible to get the lyrics from songs in EasyWorship 7 using a hacky method involving the remote app API. But our church had v6 and we had no interest in upgrading to v7 - this did not justify the upgrade cost.

EasyWorship developers have also recently announced that an “alternate display” feature allowing you to split the front of house and live streaming design and layouts will soon be rolled out to subscription customers. Again, no interest in upgrading just for this feature - and definitely not interested in an expensive subscription!

So we had to come up with a solution within the limitations of EW 6. That meant that we wouldn’t really be able to use any methods through EasyWorship itself.

Initially I tried to use optical character recognition (pytesseract) to extract the text from the main display of EasyWorship - this would give us greater flexibility over the properties of the text - font, size, etc. - however there were a couple of problems:

  • The word recognition was a little dodgy
  • It required a lot of processing to be done - turning the output into black and white, taking out pixels that didn’t match certain RGB values, inverting colours, then running OCR on the final image
  • OCR retains line breaks and the program has no clue where the certain lyrics are meant to be on a new line, which meant it was basically exactly the same as just displaying whatever was going out to the front of house on the stream

I eventually came up with a solution that allowed us to put backgrounds in EasyWorship while having no visible backgrounds in the OBS scene. By applying a series of filters we can actually take the background out of the EasyWorship main output display.

Add the EasyWorship front of house output as a source in OBS

Apply filter - Vintage

You need this OBS plugin to use this filter. By applying this filter, it turns the display into black and white, making it easier to remove colours in the background that we don’t want.

Apply filter - Luma Key

Luma Max: 1.00
Luma Min: 0.95

The luma key filter creates a mask based on luminance levels of the source. The black and white image makes the mask more accurate. These values essentially key out all colours that are dark (the parts we don’t want since the lyrics are white)

Apply filter - Colour Key

Key Colour Type: Custom
Key Colour: #000000
Similarity: 1000
Smoothness: 684
Opacity: 100
Contrast: 0.00
Brightness: 0.00
Gamma: 0.00

This filter acts as sort of a backup to the luma key - it takes out essentially anything that is not white in colour. In some cases it will key out certain elements that the luma key has missed.

Apply filter - Colour Correction

Gamma: 3.00
Contrast: 2.00
Brightness: 1.00
Saturation: -1.00
Hue Shift: 0.00
Opacity: 100
Colour: #ffffff

Sadly the luma key and colour key filters also take out some small bits of the words in the lyrics, so this colour correction filter helps to reverse that effect a little. It will make whatever is left of the filtered source a little more clear.


And there you have it - a more or less clear display of lyrics from your front of house EasyWorship display that has a background on it.

For my EW setup, I like to make the margins of the lyrics in the theme as small as possible while retaining the default font size. I then crop the filtered source of my main EW output according to the margins, meaning that I’ll be able to get all the lyrics regardless of how many lines are displayed - though I do tend to edit the songs so that each slide displays 4 lines at maximum.
This cropped lyric source then goes at the bottom in front of our full-sized camera source, creating what’s known as a lower-thirds layout. I also duplicate the filtered source (as a reference) and then crop out the copyright display at the bottom of the song slide for legal reasons - this is placed at the top of the camera source and scaled down.

 Comments