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

33 lines
878 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
flags="--cc=$CC --cxx=$CXX"
if [[ -z $FFMPEG_MSVC ]]; then
flags="--toolchain=msvc"
fi
./configure --disable-gpl --disable-nonfree --disable-doc --disable-network \
--disable-ffprobe --disable-ffplay --enable-static --disable-shared \
--enable-libopenh264 \
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
--extra-ldflags="-libpath:$PREFIX/lib" \
--extra-cflags="-I$PREFIX/include/mfx" \
${flags} ${FFBUILD_FLAGS}
make -j$JOBS
cp ffmpeg* $outDir