Build Garlic-Player for Desktop OS

Builds for desktop requires QWebengine. So, under Windows you cannot use mingw, and you need to install Microsoft Visual Studio. Free community version is sufficient. Currently, my build server uses VS 2017. You also need to compile or install a multimedia API first.

Mandatory Knowledge

You should be familiar with C++, Qt, and qt creator on your operating system. Furthermore, you have to know how to install the operating system SDK. Have a look at the supported platforms for your selected Qt version.

Multimedia APIs

The widget variant of the garlic-player supports three multimedia APIs. You can change then with the config variable set in player-widget.pro. Possible values are support_qtav, support_qtmm, and support_libvlc.

  1. QtAV (default but will replaced in v0.6.0)
  2. QtMultimedia
  3. libVLC

QtAV

QtAV is a Qt wrapper around FFmpeg. It works great until FFmpeg 5. Unfortunately, the maintainer has lost interest and abandoned it. His follow-up project is also not open-source.

QtAV is default for the current binary downloads, but there are plans for deprecating the lib. QtAV/FFmpeg produces lags on Raspberry Pi 3. Only on Raspberry 4 FFmpeg plays smooth videos with garlic-player.

As QtAV is related to the Qt version, you had to compile it. The instructions are here. Keep in mind that FFmpeg 5 will not work, so use FFmpeg 4.4.

In newer versions of garlic-player after July 2022 we enhanced the pause behaviour and discovered also an annoying memory leak. Until next stable release v0.6.0 QtAV will be definitely replaced.

libVLC

One alternative to QtAV is libVLC. On a Raspberry Pi 4 VLC is the only chance to get 4K work accelerated in full screen. FFmpeg hardware acceleration consumes more resources than libVLC.

The easiest way to install, is to use Linux package management or brew with macOS. There are compile instructions for Windows. Be aware that you have to compile it with Visual Studio and not mingw or cygwin.

QtMultimedia

QtMultimedia is the standard Multimedia interface for QT. Unfortunately, in Qt5 it is slow buggy and require the installation of additional libraries. Windows needs DirectShow and tons of codecs, Linux require gstreamer, which had also plenty of bugs in the past. With macOS, you had also to some QuickTime codes, otherwise VP8/9 and other video codecs Apple do not want to support will fail to play. Maybe things change in Qt6.

Some user reported that the K-Lite Codec Pack will work.

Build Order

The build process for garlic-player desktop requires this order:

  1. zlib
  2. quazip
  3. garlic-lib
  4. player-widget

Automation and Deploying

If you want to deploy install files, throw a look in the script directory.