Proper way to leverage another snap in a snap

Hi there,

Apparently Krita has the capability to leverage ffmpeg. I know that there is an existing snap for ffmpeg… What’s the proper procedure to leverage that in my snap? Or would I be further ahead to add ffmpeg itself to the Krita snap?

Thank you.

There’s a few things you could do here. One would be to just stage ffmpeg from the archive which would likely work fine for testing.

  - ffmpeg

If the krita developers prefer a specific release of ffmpeg, or certain build options then you could add ffmpeg as a part in the krita yaml. We have done this for other snaps which require specific ffmpeg options / codecs / formats etc to be enabled for optimal performance.

   build-packages: [git, g++, make, yasm, autoconf, libtool, cmake, pkg-config, automake, build-essential, libass-dev, libfreetype6-dev, libvdpau-dev, libsdl1.2-dev, libtheora-dev, libva-dev, libvorbis-dev, libxcb1-dev, libxcb-shm0-dev, libxcb-xfixes0-dev, texinfo, zlib1g-dev, libx264-dev, libmp3lame-dev, libopus-dev, libx265-dev, libvpx-dev]
   plugin: autotools
     - --prefix=/usr
     - --enable-gpl
     - --enable-libass
     - --enable-libfreetype
     - --enable-libmp3lame
     - --enable-libopus
     - --enable-libtheora
     - --enable-libvorbis
     - --enable-libvpx
     - --enable-libx264
     - --enable-libx265
     - --enable-nonfree
     - --enable-shared
   source: git://
   source-type: git
   source-tag: 'n3.4.1'

There’s also a remote part you could incorporate, which builds ffmpeg from source.

    after: [ffmpeg]

Building from source (either as a remote or local part) has the trade-off that it’s going to result in longer build times and it’s an extra part to maintain in your snap. Bundling as a stage package is faster, but you have less control over how the part is built.

Hope that helps.


Thanks popey!

I was hoping there was a way to consume the other snap to take advantage of the update cycle on that snap. I’ll likely just pull it from the archive as the usage within Krita (from what I was told) seems pretty straightforward. Mostly used to export a video from a series of stills.

That seems the sensible first option, yes.