Page 1 of 1

ffmpeg 5.1.x ./configure --prefix=/tmp/ffmpeg

Posted: Thu Dec 01, 2022 10:17 pm
by Power-Readâ„¢
Does anyone know why does the "--prefix" don't work anymore while compiling ffmpeg?

Here is what i did:

wget https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.bz2
wget https://ffmpeg.org/releases/ffmpeg-5.1.2.tar.bz2.asc
curl https://ffmpeg.org/ffmpeg-devel.asc | gpg --import
gpg --verify ffmpeg-5.1.2.tar.bz2.asc ffmpeg-5.1.2.tar.bz2
tar -jxvf ffmpeg-5.1.2.tar.bz2
cd ffmpeg-5.1.2
./configure --prefix=/tmp/ffmpeg-5.1.2 --enable-static --disable-shared --enable-pic --enable-libfdk-aac
make -j$(nproc)


But the ffmpeg still compiled in the current dir, instead of /tmp/ffmpeg-5.1.2

Running Debian 11 amd64. Tried on 2 PC's.

Re: ffmpeg 5.1.x ./configure --prefix=/tmp/ffmpeg

Posted: Fri Dec 02, 2022 4:44 pm
by NullNix
--prefix affects where the program expects to find its files when it's invoked, not where the compiled objects go: it has never affected where builds are done. (It also affects where 'make install' installs the files, and it can be reset at install time to put them somewhere else, maybe for symlinking into their final destination or for making packages.)

If you want to build it in another directory, *sometimes* you can mkdir the other directory, cd into it, then /run/from/the/original/directory/configure ..., but honestly it's much more reliable to simply cp -a (or cp -al or cp --a --reflink) the entire source tree and build from the srcdir.