Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

66 lines
2.1KB

  1. SHELL:=/bin/bash
  2. ffmpeg:
  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
  9. ffmpeg_impl:
  10. apt-get update
  11. sudo apt-get install -y yasm
  12. sudo apt-get install -y nasm # apparently x264 switched to this
  13. mkdir x264_out
  14. mkdir ffmpeg_out
  15. pushd x264 && \
  16. git checkout 2451a7282463f68e532f2eee090a70ab139bb3e7
  17. # ^ parent of 71ed44c7312438fac7c5c5301e45522e57127db4, which is where they dropped support for:
  18. # libavcodec/libx264.c:282:9: error: 'x264_bit_depth' undeclared (first use in this function); did you mean 'x264_picture_t'?
  19. # if (x264_bit_depth > 8)
  20. # ^~~~~~~~~~~~~~
  21. pushd x264 && \
  22. ./configure --cxx=$$(which c++) --enable-static --enable-shared --prefix=$$(realpath $$PWD/../x264_out) && \
  23. make -j $$(nproc) && \
  24. make install
  25. pushd x264 && \
  26. ./configure --cxx=$$(which c++) --enable-static --enable-shared && \
  27. make -j $$(nproc) && \
  28. make install
  29. pushd ffmpeg && git checkout n3.1
  30. #git checkout 71052d85c16bd65fa1e3e01d9040f9a3925efd7a # or my muxing code won't work, they've modified the example since fba1592f35501bff0f28d7885f4128dfc7b82777
  31. pushd ffmpeg && \
  32. ./configure --cxx=$$(which c++) --enable-static --enable-shared --enable-libx264 --enable-gpl --prefix=$$(realpath $$PWD/../ffmpeg_out) && \
  33. make -j $$(nproc) && \
  34. make install
  35. package:
  36. rm -rf out
  37. mkdir -p out/opt/cppse/build/x264
  38. mkdir -p out/opt/cppse/build/ffmpeg
  39. cp -prv ./x264_out/* out/opt/cppse/build/x264/
  40. cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/
  41. rm -rf ffmpeg_*_amd64.deb
  42. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n ffmpeg --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
  43. clean:
  44. rm -rf x264
  45. rm -rf ffmpeg
  46. rm -rf out
  47. rm -rf x264_out
  48. rm -rf ffmpeg_out
  49. shell:
  50. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash