Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

84 linhas
3.2KB

  1. SHELL:=/bin/bash
  2. ubuntu1804:
  3. # sometimes got 404 on videolan/x264
  4. #git clone https://code.videolan.org/videolan/x264
  5. #git clone git://source.ffmpeg.org/ffmpeg.git
  6. # for this reason pushed them to my own github
  7. git clone https://github.com/rayburgemeestre/x264
  8. git clone https://github.com/rayburgemeestre/ffmpeg
  9. bash ../ubuntu1804.sh make ffmpeg_impl
  10. make package-ubuntu1804
  11. ubuntu2004:
  12. # sometimes got 404 on videolan/x264
  13. #git clone https://code.videolan.org/videolan/x264
  14. #git clone git://source.ffmpeg.org/ffmpeg.git
  15. git clone https://github.com/rayburgemeestre/x264
  16. git clone https://github.com/rayburgemeestre/ffmpeg
  17. bash ../ubuntu2004.sh make ffmpeg_impl
  18. make package-ubuntu2004
  19. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  20. ffmpeg_impl:
  21. apt-get update
  22. sudo apt-get install -y yasm
  23. sudo apt-get install -y nasm # apparently x264 switched to this
  24. mkdir x264_out
  25. mkdir ffmpeg_out
  26. pushd x264 && \
  27. git checkout 2451a7282463f68e532f2eee090a70ab139bb3e7
  28. # ^ parent of 71ed44c7312438fac7c5c5301e45522e57127db4, which is where they dropped support for:
  29. # libavcodec/libx264.c:282:9: error: 'x264_bit_depth' undeclared (first use in this function); did you mean 'x264_picture_t'?
  30. # if (x264_bit_depth > 8)
  31. # ^~~~~~~~~~~~~~
  32. pushd x264 && \
  33. ./configure --cxx=$$(which c++) --enable-static --enable-shared --prefix=$$(realpath $$PWD/../x264_out) && \
  34. make -j $$(nproc) && \
  35. make install
  36. pushd x264 && \
  37. ./configure --cxx=$$(which c++) --enable-static --enable-shared && \
  38. make -j $$(nproc) && \
  39. make install
  40. pushd ffmpeg && git checkout n3.1
  41. #git checkout 71052d85c16bd65fa1e3e01d9040f9a3925efd7a # or my muxing code won't work, they've modified the example since fba1592f35501bff0f28d7885f4128dfc7b82777
  42. pushd ffmpeg && \
  43. ./configure --cxx=$$(which c++) --enable-static --enable-shared --enable-libx264 --enable-gpl --disable-swresample --prefix=$$(realpath $$PWD/../ffmpeg_out) && \
  44. make -j $$(nproc) && \
  45. make install
  46. package-ubuntu1804:
  47. rm -rf out
  48. mkdir -p out/opt/cppse/build/x264
  49. mkdir -p out/opt/cppse/build/ffmpeg
  50. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  51. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  52. rm -rf cppseffmpeg_*_amd64.deb
  53. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n cppseffmpeg --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "ffmpeg - build dependency" --url "https://gitea.cppse.nl/rayburgemeestre/build-config/src/branch/master/ffmpeg" --deb-generate-changes -C /src/out
  54. package-ubuntu2004:
  55. rm -rf out
  56. mkdir -p out/opt/cppse/build/x264
  57. mkdir -p out/opt/cppse/build/ffmpeg
  58. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  59. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  60. rm -rf cppseffmpeg_*_amd64.deb
  61. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -v 1.1 -s dir -t deb -n cppseffmpeg --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "ffmpeg - build dependency" --url "https://gitea.cppse.nl/rayburgemeestre/build-config/src/branch/master/ffmpeg" --deb-generate-changes -C /src/out
  62. clean:
  63. rm -rf x264
  64. rm -rf ffmpeg
  65. rm -rf out
  66. rm -rf x264_out
  67. rm -rf ffmpeg_out
  68. shell:
  69. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash