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.

51 lines
956 B

  1. #!/bin/bash
  2. #Build w/o 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 \
  22. --prefix="/app/ffmpeg/install/" \
  23. --extra-cflags="-I/app/ffmpeg/install/include" \
  24. --extra-ldflags="-L/app/ffmpeg/install/lib" \
  25. --extra-libs="-lpthread -lm -lz -ldl" \
  26. --cpu=native \
  27. --enable-gpl \
  28. --enable-libx264 \
  29. --enable-libx265
  30. # --disable-debug \
  31. # --enable-debug \
  32. make -j8
  33. if make
  34. then
  35. make install
  36. cd "$curDir"
  37. rm -rf "$pkg"
  38. else
  39. cd "$curDir"
  40. echo "BUILD FAILED"
  41. fi
  42. echo "DONE"