gcc-core
package included with the Cygwin installer) is inherently broken for cross-compiling purposes, and there doesn't seem to be any intent from the Cygwin maintainers to fix this, so currently, the only way to compile software for Windows with Cygwin is to set up a MinGW-w64 toolchain under it. Thankfully, this is as easy as installing a few packages. After this, we'll be compiling the remaining packages, before using a combination of both to compile FFmpeg itself.fdk-aac
, libopus
, x265
and the SOX resampler enabled. I may consider adding instructions for compiling specific external libraries to the guide if I get enough requests to do so for a particular library.apt-cyg
and all packages compiled from source - will consume up to 2.8GB of disk space, although the guide also includes commands to clean up everything but the FFmpeg installation once done. The installation itself, made up of the binaries and documentation, occupies just over 200MB of disk space. ffmpeg_sources
, where it will download and compile all of the packages being built from source. FFmpeg will be installed to /usr/local
, where the FHS standard recommends that software compiled by the user is installed to. This location also has the secondary advantage of being on the system PATH
by default in Cygwin, and so doesn't require the $PATH
variable to be updated.wget
, tar
, gawk
and git
packages. The good news is that these packages are dependencies for a tool that can prevent you from ever needing to use the Cygwin installer again. apt-cyg
, I highly recommend you replace it with this one, which is a much more fully-fledged piece of software compared to the original, as well as the only package manager for Cygwin that is currently in active development.apt-cyg
:--enable-package
line when compiling FFmpeg in the final stage of this guide.toolchain-x86_64-mingw32.cmake
(make sure Windows is showing extensions, and that the extension is .cmake
). --enable-*package*
lines for each package in the list above that you didn't download or compile a library for.ffmpeg
in the Cygwin terminal.ffmpeg_sources
directory and unneeded static libraries, this will also remove any packages installed earlier that are no longer needed, except for those that are commonly needed for building tools on Cygwin/Linux.