This is the repository for the FFmpeg SDK and Content Snap.. It is a community-maintained package to easily allow other snaps use the latest ffmpeg related libraries without any hassel via snapcraft's content interface.
"FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata."
FFmpeg SDK Status
FFmpeg Content Snap Status
Using this SDK has two parts involved.
While building your app as a snap, you need to add these environment variables in the part that needs the ffmpeg libraries.
build-environment:
- PKG_CONFIG_PATH: /snap/ffmpeg-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
- LD_LIBRARY_PATH: /snap/ffmpeg-2404-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
- PATH: /snap/ffmpeg-2404-sdk/current/usr/bin${PATH:+:$PATH}
To get the libraries at runtime, you need to connect the ffmpeg content snap to your app snap.
For that you first need to define a plug for ffmpeg in the top level your snapcraft.yaml
.
plugs:
ffmpeg-2404: # name of the plug
interface: content # interface of snapcraft
target: ffmpeg-platform # mount point of the content snap
default-provider: ffmpeg-2404 # the default provider that'll provide this library
Now in the apps part which needs to use the ffmpeg libraries during runtime, you need to add the following environment variables.
apps:
app:
environment:
LD_LIBRARY_PATH: $SNAP/ffmpeg-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR:$LD_LIBRARY_PATH
PATH: $SNAP/ffmpeg-platform/usr/bin:$PATH
You can also declare these variables at the top level of your snapcraft.yaml
if you want to use them in all the apps. Some snaps that use this ffmpeg-sdk.
And many others!
Simply change all the occurances of 2204
to 2404
in your snapcraft.yaml file and you are good to go!
Thanks for your interest! Below you find instructions to help you contribute to this snap.
The general workflow is to submit pull requests that merges your changes into the 2404
branch here on GitHub. Once the pull request has been merged, a GitHub action will automatically build the snap and publish it to the candidate
channel in the Snap Store. Once the snap has been tested thoroughly, we promote it to the stable
channel so all our users get it!
If this is your first time contributing to this snap, you first need to set up your own fork of this repository.
-
Fork the repository into your own GitHub namespace.
-
Clone your fork, so that you have it on your local computer.
-
Configure your local repo. To make things a bit more intuitive, we will rename your fork's remote to
myfork
, and add the snapcrafters repo assnapcrafters
.git remote rename origin myfork git remote add snapcrafters https://github.com/snapcrafters/signal-desktop.git git fetch --all
Once you're all setup for contributing, keep in mind that you want the git information to be all up-to-date. So if you haven't "fetched" all changes in a while, start with that:
git fetch --all -p
Now that your git metadata has been updated you are ready to create a bugfix branch, make your changes, and open a pull request.
-
All pull requests should go to the stable branch so create your branch as a copy of the stable branch:
git checkout -b my-bugfix-branch snapcrafters/candidate
-
Make your desired changes and build a snap locally for testing:
snapcraft --use-lxd
-
After you are happy with your changes, commit them and push them to your fork so they are available on GitHub:
git commit -a git push -u myfork my-bugfix-branch
-
Then, open up a pull request from your
my-bugfix-branch
to thesnapcrafters/candidate
branch. -
Once you've opened the pull request, it will automatically trigger the build-test action that will launch a build of the snap. You can watch the progress of the snap build from your pull request (Show all checks -> Details). Once the snap build has completed, you can find the built snap (to test with) under "Artifacts".
-
Someone from the team will review the open pull request and either merge it or start a discussion with you with additional changes or clarification needed.
-
Once the pull request has been merged into the stable branch, a GitHub action will rebuild the snap using your changes and publish it to the Snap Store into the
candidate
channel. After sufficient testing of the snap from the candidate channel, one of the maintainers or administrators will promote the snap to the stable branch in the Snap Store.
- The licenses of FFmpeg are GPL-2.0, GPL-3.0, LGPL-2.1, MIT and some other licenses. You can find more about the licenses in the FFmpeg source code. The license of this repository is MIT.