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.

67 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-gpl \
  35. --enable-runtime-cpudetect \
  36. --cpu=native \
  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. --enable-nonfree
  47. # --disable-debug \
  48. # --enable-debug \
  49. # --enable-libmfx \
  50. make -j8
  51. if make
  52. then
  53. make install
  54. cd "$curDir"
  55. rm -rf "$pkg"
  56. else
  57. cd "$curDir"
  58. echo "BUILD FAILED"
  59. fi
  60. echo "Done"