We're hiring!

Building GStreamer text rendering and overlays on Windows with gst-build

Aaron Boxer avatar

Aaron Boxer
September 28, 2020

Share this post:

There are two ways of building GStreamer on Windows - using either cerbero or gst-build. As gst-build is a lot quicker, we will use this approach in this post.

GStreamer relies on various 2D font rendering and layout libraries such as Pango and Cairo to generate text for the Pango plugin, which contains elements such as textoverlay. However, building GStreamer on Windows using gst-build does not currently include support for Pango.

In this post, we will learn how to add the Pango plugin to a gst-build installation on Windows.

Building Pango

If you haven't already followed my previous guide on GStreamer and Windows, please follow the steps there to build GStreamer from source.

Now, we will need to clone a few more repositories into our source directory :

  1. freetype2 https://gitlab.collabora.com/gstreameronwindows/freetype2.git
  2. pixman https://gitlab.freedesktop.org/pixman/pixman
  3. harfbuzz https://github.com/harfbuzz/harfbuzz
  4. cairo https://gitlab.collabora.com/gstreameronwindows/cairo.git
  5. pango https://gitlab.gnome.org/GNOME/pango.git

Next we open a Visual Studio x64 command prompt and execute the following:

> cd freetype2 && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\pixman && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\harfbuzz && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\cairo && meson build --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\pango && meson build -Dintrospection=false --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install
> cd ..\gst-build-x64 && meson build --reconfigure --prefix=%GSTREAMER_1_0_ROOT_X86_64% --buildtype=release && ninja -C build install

At this stage, it is a good idea to delete our plugin cache:

> rmdir /Q /S  c:\\Users\YOUR_USER_NAME\AppData\Local\Microsoft\Windows\INetCache\gstreamer-1.0

And finally:

> gst-inspect-1.0 textoverlay

should find the overlay plugin!

If you have any questions about GStreamer text rendering on Windows, or any other platform, please contact us.

Comments (0)

Add a Comment

Allowed tags: <b><i><br>Add a new comment:

Search the newsroom

Latest Blog Posts

Implementing a performance boosting algorithm in Coccinelle


Last year, from June to September, I worked on the kernel development tool Coccinelle under Collabora. I implemented a performance boosting…

Desktop OpenGL 3.1 on Mali GPUs with Panfrost


The open source Panfrost driver for Arm Mali Midgard and Bifrost GPUs now provides non-conformant OpenGL ES 3.0 on Bifrost and desktop OpenGL…

Empathy first: Driving growth through people leadership


This year, the global pandemic has put a strain on us all. Motivation can become hard to maintain, worries can cloud our minds. Now more…

Developing Wayland Color Management and High Dynamic Range


Wayland is still lacking proper consideration for color management & support for high dynamic range (HDR) imagery. However, a group of developers…

A summer sprint: bringing near-native performance to Zink


This week marks two years since the OpenGL implementation on Vulkan was initially announced. Since then, and especially over the past few…

From Panfrost to production, a tale of Open Source graphics


Since our previous update on Panfrost, the open source stack for Arm's Mali Midgard and Bifrost GPUs, we've focused on taking our driver…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2021. All rights reserved. Privacy Notice. Sitemap.