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.

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