GoAdmio

ffmpeg

Rebuild ImageMagick from source and install FFmpeg from the Nux Dextop repository — CentOS 7 (EL7) only

On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also


Overview

/go/ffmpeg does two unrelated things in one script:

  1. Removes the distro's ImageMagick package and rebuilds it from source.
  2. Adds the Nux Dextop repository and installs ffmpeg and ffmpeg-devel from it.

[!WARNING] This script is written for CentOS 7 (EL7) specifically: it uses yum, and the Nux Dextop package it downloads is named el7 in its URL. It has no operating system check at all, unlike every other install command in this reference. On AlmaLinux, Rocky Linux 8/9, Fedora, Red Hat 8/9, Debian, or Ubuntu, parts of it will fail, and the el7 Nux Dextop package will likely not install. Confirm your server is actually EL7 before running it, or treat it as a reference for a manual install on other systems.

[!WARNING] The GPG key and the Nux Dextop release package are both downloaded over plain HTTP, with no signature check on the key itself. Review this before relying on it for FFmpeg on a production server. CentOS 7 itself reached end of life in June 2024 and no longer receives security updates.

The command re-execs itself inside a detached screen session named FFMPEG, because the ImageMagick source build can take a long time. The call is appended to /var/log/go/ffmpeg.log.


Quick start

# EL7 servers only — see the warnings above
/go/ffmpeg

# Check on it later
screen -r FFMPEG

Syntax

/go/ffmpeg

The command takes no arguments.


Options

None.


Output

The command itself prints nothing to the terminal that started it — it immediately detaches into a screen session called FFMPEG and returns. All build and install output happens inside that session.

# Watch it live
screen -r FFMPEG

# Detach again without stopping it
# (inside screen) Ctrl-A, then D

If the session has already finished, screen -r FFMPEG reports no such session.


Examples

# Run it
/go/ffmpeg

# Come back later and check progress
screen -r FFMPEG
# Confirm the results once it's done
convert -version
ffmpeg -version

Troubleshooting

Symptom Likely cause Fix
yum: command not found The server isn't on an EL7-era system with yum. See the warning above; this script isn't written for your OS.
ImageMagick is now missing entirely The old package was removed before the source build finished, and the build failed partway, often silently (see Known issues). Reinstall the distro package (yum install ImageMagick), or re-run the source build steps by hand.
wget: command not found, or the ImageMagick download fails wget isn't installed, or ftp.imagemagick.org isn't reachable from this network. Install wget, check outbound FTP access, or download the tarball another way.
cd: ImageMagick-*: No such file or directory The tarball failed to download or extract, so no matching folder exists. Check the wget and tar output inside the screen session.
nux-dextop-release RPM fails to install The package is built for el7 specifically and your system isn't EL7. This repository isn't meant for your OS; find an FFmpeg source appropriate to your distribution.
No package ffmpeg available The Nux Dextop repository didn't get added successfully, or EPEL conflicts with it. Check that both rpm --import and the rpm -Uvh of the release package succeeded.
The screen session seems to hang with no output yum remove ImageMagick can prompt for confirmation without -y; inside a detached session there is nowhere for that prompt to go. Attach with screen -r FFMPEG and answer the prompt, or remove the package yourself with -y first.
You can't find the screen session at all It already finished (check convert -version and ffmpeg -version), or screen isn't installed. Install screen if missing; otherwise check whether the install already completed.

Details

What it does, in order

  1. Detaches into a screen session named FFMPEG (skipped if already inside one).
  2. Runs a full yum update.
  3. Removes the packaged ImageMagick (without -y; see Known issues).
  4. Installs development headers: tcl-devel, libpng-devel, libjpeg-devel, ghostscript-devel, bzip2-devel, freetype-devel, libtiff-devel.
  5. Downloads the current ImageMagick source tarball from ftp.imagemagick.org (not a pinned version, no checksum) into /root/imagemagick, extracts it, and builds it with ./configure --prefix=/usr/ and a fixed set of --with-* flags, then make and make install.
  6. Installs epel-release and updates again.
  7. Imports the Nux Dextop GPG key over HTTP and installs the el7 Nux Dextop release RPM.
  8. Installs ffmpeg and ffmpeg-devel from that repository.

Known issues


See also

Command Description
img Resize images on a GoAdmio server
webp Convert images to WebP format
package Install all base packages required by GoAdmio
font Install common fonts on a GoAdmio server