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.

79 line
3.0KB

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