commit 06472dd81b50d44609f57c78a4880338167152ae Author: Stefan Schwarz Date: Tue Dec 28 14:47:48 2021 +0100 ffmpeg diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..1b88312 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,43 @@ +kind: pipeline +type: docker +name: ffmpeg + +trigger: + event: tag + +steps: + + - name: build + image: debian:11-slim + commands: + + - apt-get update + - | + sed -i 's/main/main non-free contrib/' /etc/apt/sources.list + sed s/^deb/deb-src/ /etc/apt/sources.list > /etc/apt/sources.list.d/sources.list + apt-get update + apt-get -y install nvidia-cuda-toolkit git + apt-get -y build-dep ffmpeg + + cd /usr/local/src + git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git + cd /usr/local/src/nv-codec-headers + make && make install + + cd /usr/local/src/ffmpeg + apt-get source ffmpeg + echo 'CONFIG+= --enable-nvenc --enable-cuda' >> ffmpeg-*/debian/rules + cd ffmpeg-* && dpkg-buildpackage -r -b -j12 && cd .. + cp *.deb /drone/src + + - name: release + image: plugins/gitea-release + settings: + api_key: + from_secret: api_key + base_url: https://git.luj0ga.de + files: + - "*.deb" + checksum: + - sha256 + title: ${DRONE_TAG} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c70096 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:11 + +RUN sed -i 's/main/main non-free contrib/' /etc/apt/sources.list +RUN sed s/^deb/deb-src/ /etc/apt/sources.list > /etc/apt/sources.list.d/sources.list +RUN apt-get update +RUN apt-get -y install nvidia-cuda-toolkit git +RUN apt-get -y build-dep ffmpeg + +WORKDIR /usr/local/src +RUN git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git +WORKDIR /usr/local/src/nv-codec-headers +RUN make && make install + +WORKDIR /usr/local/src/ffmpeg +RUN apt-get source ffmpeg +RUN ls -lah ffmpeg-*/debian/rules +RUN echo 'CONFIG+= --enable-nvenc --enable-cuda' >> $(ls ffmpeg-*/debian/rules) +RUN cd ffmpeg-* && dpkg-buildpackage -r -b -j12 +RUN ls *.deb +RUN dpkg -i \ + ffmpeg_4.3.3-0+deb11u1_amd64.deb \ + libavcodec58_4.3.3-0+deb11u1_amd64.deb \ + libavdevice58_4.3.3-0+deb11u1_amd64.deb \ + libavfilter7_4.3.3-0+deb11u1_amd64.deb \ + libavformat58_4.3.3-0+deb11u1_amd64.deb \ + libavresample4_4.3.3-0+deb11u1_amd64.deb \ + libavutil56_4.3.3-0+deb11u1_amd64.deb \ + libpostproc55_4.3.3-0+deb11u1_amd64.deb \ + libswresample3_4.3.3-0+deb11u1_amd64.deb \ + libswscale5_4.3.3-0+deb11u1_amd64.deb