2023-05-22 19:50:18 +09:00
|
|
|
set -x
|
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
export ffmpegPath=$workDir/ffmpeg
|
2023-05-04 16:32:39 +09:00
|
|
|
export amfPath=$workDir/amf
|
2023-05-02 19:35:56 +09:00
|
|
|
|
2023-05-03 18:43:41 +09:00
|
|
|
git clone https://github.com/FFmpeg/FFmpeg -b release/6.0 $ffmpegPath --depth 1
|
2023-05-02 19:35:56 +09:00
|
|
|
|
2023-05-04 16:32:39 +09:00
|
|
|
git clone https://github.com/GPUOpen-LibrariesAndSDKs/AMF -b v1.4.29 $amfPath --depth 1
|
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
cd $ffmpegPath
|
|
|
|
|
2023-05-22 19:50:18 +09:00
|
|
|
# git am ../../patches/ffmpeg/*
|
|
|
|
|
2023-05-04 16:32:39 +09:00
|
|
|
cp -r $amfPath/amf/public/include $PREFIX/include/AMF
|
|
|
|
|
2023-05-02 19:35:56 +09:00
|
|
|
make distclean
|
|
|
|
|
2023-05-03 18:06:33 +09:00
|
|
|
flags="--cc=$CC --cxx=$CXX"
|
|
|
|
|
2023-05-22 19:50:18 +09:00
|
|
|
CFLAGS="-static-libgcc -static-libstdc++ -static -I$PREFIX/include/mfx" \
|
|
|
|
CXXCLAGS="-static-libgcc -static-libstdc++ -static -I$PREFIX/include/mfx" \
|
|
|
|
LDFLAGS="-static-libgcc -static-libstdc++ -static" \
|
|
|
|
./configure --disable-gpl --disable-nonfree --disable-doc \
|
|
|
|
--disable-ffprobe --disable-ffplay --enable-ffmpeg --enable-static --disable-shared \
|
2023-05-02 19:35:56 +09:00
|
|
|
--enable-libopenh264 \
|
2023-05-03 15:18:43 +09:00
|
|
|
--prefix=$PREFIX --enable-cross-compile --arch=$ARCH \
|
2023-05-03 18:06:33 +09:00
|
|
|
--pkg-config-flags="--static" --target-os=$FFMPEG_OS \
|
2023-05-04 16:32:39 +09:00
|
|
|
${flags} ${FFBUILD_FLAGS}
|
2023-05-02 19:35:56 +09:00
|
|
|
|
2023-05-03 15:18:43 +09:00
|
|
|
make -j$JOBS
|
2023-05-02 19:35:56 +09:00
|
|
|
|
2023-05-03 15:18:43 +09:00
|
|
|
cp ffmpeg* $outDir
|