Scripts for building va-api enabled ffmpeg (with intel)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

63 lines
1.2 KiB

#!/bin/bash
#build with hwaccell
export PKG_CONFIG_PATH=/app/ffmpeg/install/lib/pkgconfig:/app/ffmpeg/install/lib64/pkgconfig/:/usr/local:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig
pkg=jellyfin-ffmpeg
if ! [[ -d "$pkg" ]]
then
git clone https://github.com/jellyfin/jellyfin-ffmpeg.git
fi
cd "$pkg"
if ! [[ -f configure ]] && [[ -f autogen.sh ]]
then
bash autogen.sh
elif ! [[ -f configure ]]
then
echo "NO WAY TO CONFIGURE?, CMAKE?"
exit 1
fi
make clean
make distclean
./configure --prefix="/app/ffmpeg/install/" \
--pkg-config-flags="--static" \
--extra-cflags="-I/app/ffmpeg/install/include" \
--extra-ldflags="-L/app/ffmpeg/install/lib" \
--extra-libs="-lpthread -lm -lz -ldl" \
--enable-vaapi \
--enable-opengl \
--enable-opencl \
--enable-libmfx \
--enable-libvorbis \
--enable-libvpx \
--enable-libdrm \
--enable-libzimg \
--enable-gpl \
--enable-runtime-cpudetect \
--cpu=native \
--enable-libfdk-aac \
--enable-libx264 \
--enable-libx265 \
--enable-openssl \
--enable-libmp3lame \
--enable-pic \
--enable-nonfree
# --disable-debug \
# --enable-debug \
make -j8
if make
then
make install
cd "$curDir"
rm -rf "$pkg"
else
cd "$curDir"
echo "BUILD FAILED"
fi
echo "Done"