-
-
Save willmasters/382fe6caba44a4345a3de95d98d3aae5 to your computer and use it in GitHub Desktop.
# | |
sudo su - | |
cd /usr/local/bin | |
mkdir ffmpeg | |
cd ffmpeg | |
wget https://www.johnvansickle.com/ffmpeg/old-releases/ffmpeg-4.2.1-amd64-static.tar.xz | |
tar xvf ffmpeg-4.2.1-amd64-static.tar.xz | |
mv ffmpeg-4.2.1-amd64-static/ffmpeg . | |
ln -s /usr/local/bin/ffmpeg/ffmpeg /usr/bin/ffmpeg | |
exit |
Although I installed it @RichardTMiles way, it won't work with my php script.
Checked the script; everything seems to be ok.
@oharaandrew314 with the asterisk '*' you can get around the issue with varying version number
if [ ! -f /usr/local/bin/ffmpeg ]
then
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xvf ffmpeg-release-amd64-static.tar.xz
mv ffmpeg-*-amd64-static/ff* /usr/local/bin/
fi
Thanks!
I am following @RichardTMiles but getting following error while building my docker file for aws lambda. I see the filename is correct though.
Step 8/17 : RUN mkdir ffmpeg-release-amd64-static
---> Running in 83ef215b8ad1
Removing intermediate container 83ef215b8ad1
---> d99b1fe0ce57
Step 9/17 : RUN tar -xf ffmpeg-release-amd64-static.tar.xz --strip-components=1 -C ffmpeg-release-amd64-static
---> Running in 882c2087ead9
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
The command '/bin/sh -c tar -xf ffmpeg-release-amd64-static.tar.xz --strip-components=1 -C ffmpeg-release-amd64-static' returned a non-zero code: 2
[Container] 2023/01/23 13:30:24 Command did not exit successfully docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . exit status 2
@akayalml Amazon Linux 2 doesn't have xz
installed by default. You need to run yum install xz
and tar -xf
will work properly
Amazon Linux 2023 is out; one should upgrade as often as possible.
$ wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
$ tar -xjvf ffmpeg-snapshot.tar.bz2
$ cd ffmpeg
$ ./configure
$ make
$ sudo make install
$ ffmpeg -version
This worked for me in 2024, Amazon Linux 2
@Rudrabha your steps also work with AL2023, thanks!
I am using https://ffmpeg.org/releases/ffmpeg-7.0.tar.bz2
instead of the snapshot (which I believe is nightly?)
@Rudrabha Amazon Linux 2 is EOL and should not be used.
@RichardTMiles "Amazon Linux 2 end of support date (End of Life, or EOL) has been extended by two years from 2023-06-30 to 2025-06-30 to provide customers with ample time to migrate to the next version."
Noted @stevebanik, thanks. I’ll reiterate that everyone should be upgrading regularly. Avoiding inevitably is a poor decision IMHO. Get the latest and greatest from the newest versions. Support will end, and if you wait until the last minute you will be left insecure. It is MUCH easier to upgrade immediately as new major releases happen. Jumping 2-3 major versions is generally not a good time.
Nice find @RichardTMiles