bramp / bramp/ffmpeg-cli-wrapper

Integration tests across multiple FFmpeg versions

Offen
#392 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Java
Sterne
1.9k
Forks
424
Ø Merge
5 Std. 35 Min.
Gemergte PRs (30 T.)
2

Beschreibung

## Goal

Test the library against multiple FFmpeg versions to ensure compatibility and catch version-specific regressions.

## Current State

- CI runs on **JDK 11, 17, 21** but only one FFmpeg version (`release` via `setup-ffmpeg`).
- Unit tests mock FFmpeg — they don't exercise real FFmpeg behavior.
- No integration tests that verify actual transcoding, probing, or option handling against a real FFmpeg binary.

## Plan

### 1. Add FFmpeg version matrix to GitHub Actions
- Extend the CI matrix to include multiple FFmpeg versions (e.g. `5.1`, `6.1`, `7.1`, `release`).
- Use `FedericoCarboni/setup-ffmpeg` which supports version pinning, or download specific builds from ffmpeg.org.
- Matrix: `{java: latest} x {ffmpeg: [5.1, 6.1, 7.1, release]}`.

### 2. Create integration test suite
- New test class(es) under `src/test/java/.../integration/`, gated behind a Maven profile (e.g. `-Pintegration`) so they don't run in normal unit test builds.
- Tests should cover:
- **Probing**: `FFprobe.probe()` against sample files — verify parsed codecs, streams, format, duration.
- **Transcoding**: Basic transcode (e.g. mp4 to mkv, audio extraction) — verify output file is valid.
- **Builder options**: Exercise every builder option (`setVideoCodec`, `setAudioCodec`, `setFormat`, `setVideoFilter`, `setComplexFilter`, `setFrames`, HLS output, etc.) and verify the resulting FFmpeg command succeeds.
- **Progress listener**: Run a real transcode with `ProgressListener` and verify progress events are received.
- **Error handling**: Feed invalid input and verify exceptions are thrown with useful messages.
- **Edge cases**: Unicode filenames, paths with spaces, large filter strings.

### 3. Sample media files
- Include small (< 1MB) sample media files in `src/test/resources/` for integration tests.
- Cover common formats: mp4 (h264+aac), mkv, webm, mp3, wav, etc.

### 4. CI workflow update
- Add a separate job or workflow (`integration-test.yml`) that runs the integration profile.
- Only run on `push` to main and PRs (not on every commit to avoid long CI times).

This is related to #31 (documenting supported FFmpeg versions) — once we have the test matrix, we can confidently document which versions are supported.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit der Überprüfung der bestehenden GitHub Actions CI-Konfiguration und des Maven-Test-Setups. Füge das Integrationsprofil und die Testklassen unter src/test/java/.../integration/ hinzu, mit Beispielmedien in src/test/resources/, und füge anschließend den separaten Workflow integration-test.yml hinzu, der im Plan beschrieben ist. Als abgeschlossen gilt die Aufgabe, wenn die Versionsmatrix die echte Integrationssuite ausführt und die aufgeführten Verhaltensweisen über die angegebenen FFmpeg-Versionen hinweg überprüft.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
ci-cd, testing
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.