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

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