From 9496d99dab463c4fc9eb23b5795a3a06430f8d8e Mon Sep 17 00:00:00 2001 From: winlin Date: Wed, 19 Jun 2024 17:55:16 +0800 Subject: [PATCH] Remove FFmpeg4 support, for libsrt 1.5.3 does not support it. --- .github/workflows/release.yml | 53 +--------------------------------- Dockerfile.base4 | 54 ----------------------------------- Dockerfile.base50 | 1 - Dockerfile.base51 | 1 - Dockerfile.base999999 | 1 - 5 files changed, 1 insertion(+), 109 deletions(-) delete mode 100644 Dockerfile.base4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b6c4a0..cde8f09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,9 @@ jobs: base: 'Dockerfile.base' base2: ['Dockerfile.base', 'Dockerfile.base2'] base3: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3'] - base4: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3', 'Dockerfile.base4'] base50: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3', 'Dockerfile.base50'] base51: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3', 'Dockerfile.base51'] - base999999: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3', 'Dockerfile.base4', 'Dockerfile.base50', 'Dockerfile.base51', 'Dockerfile.base999999'] + base999999: ['Dockerfile.base', 'Dockerfile.base2', 'Dockerfile.base3', 'Dockerfile.base50', 'Dockerfile.base51', 'Dockerfile.base999999'] ################################################################ # The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8 # Generate variables like: @@ -40,7 +39,6 @@ jobs: base: ${{ steps.filter.outputs.base }} base2: ${{ steps.filter.outputs.base2 }} base3: ${{ steps.filter.outputs.base3 }} - base4: ${{ steps.filter.outputs.base4 }} base50: ${{ steps.filter.outputs.base50 }} base51: ${{ steps.filter.outputs.base51 }} base999999: ${{ steps.filter.outputs.base999999 }} @@ -190,54 +188,6 @@ jobs: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}-base3 runs-on: ubuntu-20.04 - docker-base4: - needs: - - docker-base3 - - envs - if: ${{ always() && needs.envs.outputs.base4 == 'true' }} - steps: - ################################################################ - - name: Covert output to env - run: | - echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV - ################################################################ - - name: Checkout repository - uses: actions/checkout@v3 - ################################################################ - # See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization - # https://github.com/docker/setup-qemu-action - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - # https://github.com/docker/setup-buildx-action - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - ################################################################ - - name: Login docker hub - uses: docker/login-action@v2 - with: - username: "${{ secrets.DOCKER_USERNAME }}" - password: "${{ secrets.DOCKER_PASSWORD }}" - - name: Build and push to docker registry - run: | - docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \ - --output "type=image,push=true" \ - -t ossrs/srs:${SRS_TAG}-base4 \ - -f Dockerfile.base4 . - ################################################################ - - name: Login aliyun hub - uses: docker/login-action@v2 - with: - registry: registry.cn-hangzhou.aliyuncs.com - username: "${{ secrets.ACR_USERNAME }}" - password: "${{ secrets.ACR_PASSWORD }}" - - name: Copy to Aliyun registry - uses: akhilerm/tag-push-action@v2.1.0 - with: - src: ossrs/srs:${{ env.SRS_TAG }}-base4 - dst: | - registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}-base4 - runs-on: ubuntu-20.04 - docker-base50: needs: - docker-base3 @@ -336,7 +286,6 @@ jobs: docker-base999999: needs: - - docker-base4 - docker-base50 - docker-base51 - envs diff --git a/Dockerfile.base4 b/Dockerfile.base4 deleted file mode 100644 index 250466a..0000000 --- a/Dockerfile.base4 +++ /dev/null @@ -1,54 +0,0 @@ -ARG ARCH - -#------------------------------------------------------------------------------------ -#--------------------------build----------------------------------------------------- -#------------------------------------------------------------------------------------ -# http://releases.ubuntu.com/focal/ -FROM ${ARCH}ossrs/srs:ubuntu20-base3 as build - -ARG BUILDPLATFORM -ARG TARGETPLATFORM -ARG JOBS=2 -RUN echo "BUILDPLATFORM: $BUILDPLATFORM, TARGETPLATFORM: $TARGETPLATFORM, JOBS: $JOBS" - -# https://serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image -ENV DEBIAN_FRONTEND=noninteractive - -# Update the mirror from aliyun, @see https://segmentfault.com/a/1190000022619136 -#ADD sources.list /etc/apt/sources.list -#RUN apt-get update - -RUN apt-get update && \ - apt-get install -y aptitude gcc g++ make patch unzip python \ - autoconf automake libtool pkg-config zlib1g-dev \ - liblzma-dev libzip-dev libbz2-dev tcl - -# Libs path for app which depends on ssl, such as libsrt. -ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/ssl/lib/pkgconfig - -# Libs path for FFmpeg(depends on serval libs), or it fail with: -# ERROR: speex not found using pkg-config -ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig - -# To use if in RUN, see https://github.com/moby/moby/issues/7281#issuecomment-389440503 -# Note that only exists issue like "/bin/sh: 1: [[: not found" for Ubuntu20, no such problem in CentOS7. -SHELL ["/bin/bash", "-c"] - -# To limit each jobs in 6h, see https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits -RUN which cmake && cmake --version - -# Cost: 11578.9s -# Build FFmpeg4, static link libraries. -ADD ffmpeg-4.2.1.tar.bz2 /tmp -RUN cd /tmp/ffmpeg-4.2.1 && ./configure --enable-pthreads --extra-libs=-lpthread \ - --enable-gpl --enable-nonfree \ - --enable-postproc --enable-bzlib --enable-zlib \ - --enable-libx264 --enable-libmp3lame --enable-libfdk-aac \ - --enable-libxml2 --enable-demuxer=dash \ - --enable-openssl --enable-protocol=tls --enable-protocol=rtmps \ - --enable-libsrt --pkg-config-flags='--static' && \ - make -j${JOBS} && make install && echo "FFmpeg4 build and install successfully" -RUN cp /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg4 && \ - cp /usr/local/bin/ffprobe /usr/local/bin/ffprobe4 -RUN ls -lh /usr/local/bin/* - diff --git a/Dockerfile.base50 b/Dockerfile.base50 index ad8ad84..3c6ea78 100644 --- a/Dockerfile.base50 +++ b/Dockerfile.base50 @@ -57,4 +57,3 @@ RUN FFOPTIONS=""; if [[ $TARGETPLATFORM != 'linux/arm/v7' ]]; then \ RUN cp /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg5 && \ cp /usr/local/bin/ffprobe /usr/local/bin/ffprobe5 RUN ls -lh /usr/local/bin/* - diff --git a/Dockerfile.base51 b/Dockerfile.base51 index 0870fee..03651ad 100644 --- a/Dockerfile.base51 +++ b/Dockerfile.base51 @@ -60,4 +60,3 @@ RUN FFOPTIONS=""; if [[ $TARGETPLATFORM != 'linux/arm/v7' ]]; then \ RUN cp /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg5-hevc-over-rtmp && \ cp /usr/local/bin/ffprobe /usr/local/bin/ffprobe5-hevc-over-rtmp RUN ls -lh /usr/local/bin/* - diff --git a/Dockerfile.base999999 b/Dockerfile.base999999 index 011b320..5ddad9b 100644 --- a/Dockerfile.base999999 +++ b/Dockerfile.base999999 @@ -28,7 +28,6 @@ ADD Roboto-Regular.ttf NotoSansSC-Regular.ttf /usr/local/share/fonts/ # Copy all FFmpeg versions and cmake and other tools in /usr/local. COPY --from=build51 /usr/local /usr/local -COPY --from=build4 /usr/local/bin/ffmpeg4 /usr/local/bin/ffprobe4 /usr/local/bin/ COPY --from=build50 /usr/local/bin/ffmpeg5 /usr/local/bin/ffprobe5 /usr/local/bin/ # Note that for armv7, the ffmpeg5-hevc-over-rtmp is actually ffmpeg5.