|
|
@@ -0,0 +1,64 @@ |
|
|
|
SHELL:=/bin/bash |
|
|
|
|
|
|
|
ffmpeg: |
|
|
|
# git clone git://git.videolan.org/x264.git |
|
|
|
#git clone https://github.com/rayburgemeestre/x264 |
|
|
|
|
|
|
|
git clone https://code.videolan.org/videolan/x264 |
|
|
|
git clone git://source.ffmpeg.org/ffmpeg.git |
|
|
|
|
|
|
|
bash ../ubuntu1804.sh make ffmpeg_impl |
|
|
|
|
|
|
|
ffmpeg_impl: |
|
|
|
apt-get update |
|
|
|
sudo apt-get install -y yasm |
|
|
|
sudo apt-get install -y nasm # apparently x264 switched to this |
|
|
|
|
|
|
|
mkdir x264_out |
|
|
|
mkdir ffmpeg_out |
|
|
|
|
|
|
|
pushd x264 && \ |
|
|
|
git checkout 2451a7282463f68e532f2eee090a70ab139bb3e7 |
|
|
|
# ^ parent of 71ed44c7312438fac7c5c5301e45522e57127db4, which is where they dropped support for: |
|
|
|
# libavcodec/libx264.c:282:9: error: 'x264_bit_depth' undeclared (first use in this function); did you mean 'x264_picture_t'? |
|
|
|
# if (x264_bit_depth > 8) |
|
|
|
# ^~~~~~~~~~~~~~ |
|
|
|
pushd x264 && \ |
|
|
|
./configure --cxx=$$(which c++) --enable-static --enable-shared --prefix=$$(realpath $$PWD/../x264_out) && \ |
|
|
|
make -j $$(nproc) && \ |
|
|
|
make install && |
|
|
|
|
|
|
|
pushd x264 && \ |
|
|
|
./configure --cxx=$$(which c++) --enable-static --enable-shared && \ |
|
|
|
make -j $$(nproc) && \ |
|
|
|
make install |
|
|
|
|
|
|
|
pushd ffmpeg && git checkout n3.1 |
|
|
|
#git checkout 71052d85c16bd65fa1e3e01d9040f9a3925efd7a # or my muxing code won't work, they've modified the example since fba1592f35501bff0f28d7885f4128dfc7b82777 |
|
|
|
pushd ffmpeg && \ |
|
|
|
./configure --cxx=$$(which c++) --enable-static --enable-shared --enable-libx264 --enable-gpl --prefix=$$(realpath $$PWD/../ffmpeg_out) && \ |
|
|
|
make -j $$(nproc) && \ |
|
|
|
make install |
|
|
|
|
|
|
|
package: |
|
|
|
rm -rf out |
|
|
|
|
|
|
|
mkdir -p out/opt/cppse/build/x264 |
|
|
|
mkdir -p out/opt/cppse/build/ffmpeg |
|
|
|
|
|
|
|
cp -prv ./x264_out/* out/opt/cppse/build/x264/ |
|
|
|
cp -prv ./ffmpeg_out/* out/opt/cppse/build/ffmpeg/ |
|
|
|
|
|
|
|
rm -rf ffmpeg_1.0_amd64.deb |
|
|
|
|
|
|
|
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -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 |
|
|
|
|
|
|
|
clean: |
|
|
|
rm -rf x264 |
|
|
|
rm -rf ffmpeg |
|
|
|
rm -rf out |
|
|
|
rm -rf x264_out |
|
|
|
rm -rf ffmpeg_out |
|
|
|
|
|
|
|
shell: |
|
|
|
FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash |