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.

68 lines
1.3 KiB

1 year ago
  1. #!/bin/bash
  2. #build with hwaccell
  3. 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
  4. curDir="$PWD"
  5. pkg=jellyfin-ffmpeg
  6. if ! [[ -d "$pkg" ]]
  7. then
  8. git clone https://github.com/jellyfin/jellyfin-ffmpeg.git
  9. fi
  10. cd "$pkg"
  11. if ! [[ -f configure ]] && [[ -f autogen.sh ]]
  12. then
  13. bash autogen.sh
  14. elif ! [[ -f configure ]]
  15. then
  16. echo "NO WAY TO CONFIGURE?, CMAKE?"
  17. exit 1
  18. fi
  19. make clean
  20. make distclean
  21. ./configure --prefix="/app/ffmpeg/install/" \
  22. --pkg-config-flags="--static" \
  23. --extra-cflags="-I/app/ffmpeg/install/include" \
  24. --extra-ldflags="-L/app/ffmpeg/install/lib" \
  25. --extra-libs="-lpthread -lm -lz -ldl" \
  26. --enable-vaapi \
  27. --enable-opengl \
  28. --enable-opencl \
  29. --enable-libvpl \
  30. --enable-libvorbis \
  31. --enable-libvpx \
  32. --enable-libdrm \
  33. --enable-libzimg \
  34. --enable-libsvtav1 \
  35. --enable-gpl \
  36. --enable-runtime-cpudetect \
  37. --enable-libfdk_aac \
  38. --enable-libx264 \
  39. --enable-libx265 \
  40. --enable-openssl \
  41. --enable-libmp3lame \
  42. --enable-pic \
  43. --enable-libass \
  44. --enable-libfreetype \
  45. --enable-libsrt \
  46. --cpu=native \
  47. --enable-nonfree
  48. # --disable-debug \
  49. # --enable-debug \
  50. # --enable-libmfx \
  51. make -j8
  52. if make
  53. then
  54. make install
  55. cd "$curDir"
  56. rm -rf "$pkg"
  57. else
  58. cd "$curDir"
  59. echo "BUILD FAILED"
  60. fi
  61. echo "Done"