adofai-ffmpeg-builder/scripts/build-ffmpeg.sh

29 lines
851 B
Bash

export ffmpegPath=$workDir/ffmpeg
export amfPath=$workDir/amf
# export CFLAGS=-L$PREFIX/lib
git clone https://github.com/FFmpeg/FFmpeg -b release/6.0 $ffmpegPath --depth 1
git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF -b v1.4.29 $amfPath --depth 1
cd $ffmpegPath
cp -r $amfPath/amf/public/include $PREFIX/include/AMF
make distclean
if [[ $FFMPEG_MSVC == 1 ]]; then
flags="--toolchain=msvc"
fi
LDFLAGS="-arch $ARCH" ./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
--enable-libopenh264 --cc="${CC:-clang -arch $ARCH}" --cxx="${CXX:-g++ -arch $ARCH}" \
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
${flags} ${FFBUILD_FLAGS}
make -j$JOBS
cp ffmpeg* $outDir