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.

65 lines
1.3 KiB

  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-nonfree
  45. # --disable-debug \
  46. # --enable-debug \
  47. # --enable-libmfx \
  48. make -j8
  49. if make
  50. then
  51. make install
  52. cd "$curDir"
  53. rm -rf "$pkg"
  54. else
  55. cd "$curDir"
  56. echo "BUILD FAILED"
  57. fi
  58. echo "Done"