Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
48 changes: 48 additions & 0 deletions .github/actions/setup-ffmpeg/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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"

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
curl -L "https://evermeet.cx/ffmpeg/ffmpeg-$FF_VERSION.zip" -o ffmpeg.zip
unzip -q ffmpeg.zip
mv ffmpeg "$INSTALL_DIR/ffmpeg"
curl -L "https://evermeet.cx/ffmpeg/ffprobe-$FF_VERSION.zip" -o ffprobe.zip
unzip -q ffprobe.zip
mv ffprobe "$INSTALL_DIR/ffprobe"
chmod +x "$INSTALL_DIR/"*
Comment thread
rob93c marked this conversation as resolved.

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/" \;
fi
Comment thread
rob93c marked this conversation as resolved.

echo "$INSTALL_DIR" >> "$GITHUB_PATH"

- name: Verify FFmpeg and FFprobe installations
shell: bash
run: |
ffmpeg -version
ffprobe -version
8 changes: 4 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- 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