Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/actions/setup-ffmpeg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Setup FFmpeg and FFprobe
description: Install FFmpeg and FFprobe across Linux, macOS, and Windows
inputs:
ffmpeg-version:
description: FFmpeg version to install
required: true
runs:
using: composite
steps:
- name: Install FFmpeg and FFprobe
shell: bash
run: |
set -euo pipefail

FF_VERSION="${{ inputs.ffmpeg-version }}"
INSTALL_DIR="$HOME/ffmpeg"
mkdir -p "$INSTALL_DIR"

echo "Installing FFmpeg and FFprobe $FF_VERSION on ${{ runner.os }}"

if [[ "${{ runner.os }}" == "Linux" ]]; then
docker pull mwader/static-ffmpeg:$FF_VERSION
CID=$(docker create mwader/static-ffmpeg:$FF_VERSION)
docker cp "$CID:/ffmpeg" "$INSTALL_DIR/ffmpeg"
docker cp "$CID:/ffprobe" "$INSTALL_DIR/ffprobe"
docker rm "$CID"
chmod +x "$INSTALL_DIR/"*

elif [[ "${{ runner.os }}" == "macOS" ]]; then
FF_VERSION=$(echo "$FF_VERSION" | awk -F. '{print $1 $2}')
curl -L "https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" -o ffmpeg.zip
unzip -q ffmpeg.zip
mv ffmpeg "$INSTALL_DIR/ffmpeg"
curl -L "https://www.osxexperts.net/ffprobe${FF_VERSION}arm.zip" -o ffprobe.zip
unzip -q ffprobe.zip
mv ffprobe "$INSTALL_DIR/ffprobe"
chmod +x "$INSTALL_DIR/"*
rm -f ffmpeg.zip ffprobe.zip

elif [[ "${{ runner.os }}" == "Windows" ]]; then
curl -L "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-$FF_VERSION-essentials_build.zip" -o ffmpeg.zip
unzip -q ffmpeg.zip
find . -type f \( -name ffmpeg.exe -o -name ffprobe.exe \) -exec mv {} "$INSTALL_DIR/" \;
rm -f ffmpeg.zip
fi

echo "$INSTALL_DIR" >> "$GITHUB_PATH"

- name: Verify FFmpeg and FFprobe installations
shell: bash
run: |
ffmpeg -version
ffprobe -version
10 changes: 5 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-15-intel ] # pin macos to latest x64 image
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout code changes
uses: actions/checkout@v6

- name: Setup FFmpeg
uses: FedericoCarboni/setup-ffmpeg@v3
- name: Setup FFmpeg and FFprobe
uses: ./.github/actions/setup-ffmpeg
with:
# bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg|~7.0
ffmpeg-version: '7.0.2'
# bump: ffmpeg-ci /ffmpeg-version: '([\d.]+)'/ docker:mwader/static-ffmpeg
ffmpeg-version: 8.0.1

- name: Setup Java
uses: actions/setup-java@v5
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM eclipse-temurin:25-alpine AS builder

WORKDIR /app

# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg|~7.0
COPY --from=mwader/static-ffmpeg:7.0.2 /ff* /usr/bin/
# bump: ffmpeg /static-ffmpeg:([\d.]+)/ docker:mwader/static-ffmpeg
COPY --from=mwader/static-ffmpeg:8.0.1 /ff* /usr/bin/

COPY . .
RUN --mount=type=cache,target=/root/.gradle ./gradlew check installDist --no-daemon
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Cella Roberto
Copyright (c) 2022-2026 Cella Roberto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading