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.
stage-packages:
- 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.
parts:
ffmpeg:
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
configflags:
- --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.ffmpeg.org/ffmpeg.git
source-type: git
source-tag: 'n3.4.1'
There’s also a remote part you could incorporate, which builds ffmpeg from source.
parts:
krita:
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.