These stage snaps integrate FFmpeg utilities and its libraries to your snap. These can be used by applications that don’t need to compile against FFmpeg libraries but simply calls the commands to do the job.
Variants
Due to the licensing model of FFmpeg, you can only integrate the variant that is compatible with your software’s license, here are the available variants:
core18-lgpl
: If your application is LGPL compatible
Usage should be fine with most cases, but some codecs are not available.
core18-gplv2
: If your application is GPLv2 compatible
Linking the shipped FFmpeg shared libraries with your GPLv2 incompatible software is a copyright infringement to the GPLv2 FFmpeg components’ authors!
core18-gplv3
: If your application is GPLv3 compatible
Linking the shipped FFmpeg shared libraries with your GPLv3 incompatible software is a copyright infringement to the GPLv3 FFmpeg components’ authors!
How to use
Merge the following ffmpeg
part definition to your snapcraft yaml file.
parts:
ffmpeg:
plugin: nil
stage-snaps:
- ffmpeg-_variant_name_
Then, copy & paste the entire stage-packages
stanza in each variant’s snapcraft recipe to the ffmpeg part:
- https://git.launchpad.net/ffmpeg-snaps/tree/snap/snapcraft.yaml?h=core18-lgpl
- https://git.launchpad.net/ffmpeg-snaps/tree/snap/snapcraft.yaml?h=core18-gplv2
- https://git.launchpad.net/ffmpeg-snaps/tree/snap/snapcraft.yaml?h=core18-gplv3
(This is required as the FFmpeg stage snaps don’t ship the stage-packages in itself as it will cause file conflicts when the consuming snaps also ships the same stage-packages)
Examples
- Patch to make
gallery-dl
useffmpeg-core18-lgpl
stage snap instead of ffmpeg from Ubuntu packages: https://github.com/Lin-Buo-Ren/gallery-dl/commit/3f39c3d04e40ebd1ae15126bb7b373ddc3d66678
Happy snapcrafting