Last active
January 17, 2025 10:03
-
-
Save yemster/4750f60dc20edd85a20afb9d6251567c to your computer and use it in GitHub Desktop.
Installing ffmpeg on Amazon Linux 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In case helpful, this worked for me. | |
I opted for prebuilt for speed and peace of mind - this should work on any architecture of Amazon Linux 2. | |
(_Although not tested , should also work for Amazon Linux 2023_). | |
**Prereq** | |
- visit https://johnvansickle.com/ffmpeg/ to grab the link to the relevant tarball for your specific server architecture. | |
- Use `uname -a` to find out your arch if unknown | |
### TL;DR | |
```shell | |
mkdir ~/sources && cd ~/sources | |
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz | |
tar -xvf ffmpeg-release-arm64-static.tar.xz | |
cd ffmpeg-*-arm64-static | |
sudo mv ffmpeg /usr/local/bin/ | |
sudo mv ffprobe /usr/local/bin/ | |
# confirm it's working | |
ffmpeg -version | |
``` | |
### The details - for those who need more info | |
```shell | |
# Create/use a temporary working directory | |
mkdir ~/sources && cd ~/sources | |
# Download tarball | |
# => Visit https://johnvansickle.com/ffmpeg/ to see list of available builds per arch & distros | |
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-static.tar.xz | |
# extract tarball | |
tar -xvf ffmpeg-release-arm64-static.tar.xz | |
cd ffmpeg-*-arm64-static | |
# *** you may want to test to confirm it works *** | |
./ffmpeg -version # should see something like: `ffmpeg version 7.0.2-static` on first line | |
# relocate to system path | |
sudo mv ffmpeg /usr/local/bin/ | |
sudo mv ffprobe /usr/local/bin/ | |
# confirm it's working | |
ffmpeg -version # => ffmpeg version 7.0.2-static | |
# cleanup - optional | |
cd ~/ && rm -rf ~/sources/ffmpeg-* | |
``` | |
#### RE automated provisioning | |
This solution should work with automated provisioning as well or easy enough to adapt to specific needs. | |
It uses the latest stable package at the endpoint and does not rely on knowing the strictly version specifically named folder of the extracted tarball i.e. `cd ffmpeg-*-arm64-static`. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment