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.

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