Compiling GStreamer plugin

Does someone have experience with compiling a GStreamer plugin and could post step by step instructions on how to do it? Sadly, it’s not as easy as building a normal project, and so far my attempts to do it failed.

There are both latest versions of GStreamer itself as well as variety of plugins (base, good, bad, etc) compiled and readily available from OpenRepos but they all miss that specific one plugin that I need, i.e. modplug (support for Tracker music like Amiga MOD, XM, S3M, IT, etc). The modplug plugin is in bad plugins, but in “ext” folder (which I guess means “extras”), which isn’t included in any of the builds…

Long ago someone built that plugin (also available on OpenRepos but it was still in GStreamer 0.1 times and it doesn’t work anymore with GStreamer 1.0.

So, would someone please be able to help with either instructing how to build it or simply compiling it? The source code of bad plugins is here

2 Likes

I have no experience with that, but I’m glad that there’s someone willing to a additional Codecs. I really want support for

  • ALAC (Apple Lossless)
  • heic
  • H.265

ALAC: there is no ALAC-gstreamer-plugin, solution is to compile yourself a ALAC-enabled version of ffmpeg and use it via gstreamer1.0-libav package in all gstreamer apps…

H.265: support available since Sept’2016 in lpr repo @ openrepos (you’ll need libde265 from external source libde265 ( HEVC decoder ) | OpenRepos.net — Community Repository System) and the available version of gstreamer1.0-plugins-bad

1 Like

As for the modplug plugin:

  1. @lpr compiled the latest bad plugins for gstreamer 1.20 (see here), including the modplug plugin. But it requires replacing quite a few packages to update Jolla’s current gstreamer (1.18?) to 1.20.

  2. As I didn’t want to mess with the SFOS’ current default gstreamer installation, I eventually managed to find version 1.16 of gstreamer-plugins-bad compiled for armv7hl architecture (built for Fedora) here. It is enough to install libmodplug decoder lib and then manually extract libgstmodplug.so from the aforementioned plugins-bad rpm and just copy it to /usr/lib/gstreamer-1.0/

Works like a charm!

Now I’ll need to start hunting for aarch64 builds, or keep trying to build them myself.

1 Like

Yes, copying the codec was working in XA2, @lpr pointed me that way some time ago. I tried the same on 10 III with the Alac codec (but moved it to the lib64 folder instead of lib cause 10 III has no gstreamer folder in lib, I guess that depends ob the System architecture), but that didn’t work.

For the 10 III (and II) you need the aarch64 build of the codec (and gstreamer plugin as well). They must be compiled specifically for the aarch64 architecture (look for .aarch64 in the package name instead of .armv7hl). Copying 32-bit libs to lib64 folder won’t work.

So it seems I’ll sadly will have to wait for someone to make a package for arch64… :frowning:

Nevertheless I don’t understand why Jolla doesn’t simply adds some more standard codecs to the system itself.

Nearly every device today can handle alac, heic, h.265 files out of the box (and maybe other codecs too). As far as I know these three I mentioned could be used licence-free.

@flypig Could that perhaps be discussed at the next meeting on 23. june? I think I won’t be able to join (cause of that I didn’t add it to the meeting thread) but the intention of the topic should be clear.

Yes, of course! But I’d suggest you should make a proper question out of it and add it to the meeting thread anyway. Even if you can’t make it, it’ll force us to discuss it, and otherwise it’s likely to get lost amongst all the other discussion.

Try searching for the plugins you need compiled for aarch64 for other Linux platforms, like e.g. OpenSuSE. This way I already found the modplug plugin compiled for aarch64, so maybe you’ll be able to find what you need, too…

For info @Cryx, following your community meeting questiom, @abranson has merged his ALAC changes, so these will now be enabled in the next Sailfish OS release.

3 Likes