Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
federicocarboni committed Dec 21, 2023
1 parent d4071ca commit f0ec839
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# setup-ffmpeg

Setup FFmpeg in GitHub Actions to use `ffmpeg` and `ffprobe`. The action will download,
cache and add to `PATH` a recent FFmpeg build for the current os.
This action sets up and caches a specific FFmpeg version, providing the `ffmpeg`
and `ffprobe` commands.

Only 64-bit Linux, Windows and Mac OS are supported.
Builds are provided by the following sources:

- <https://johnvansickle.com/ffmpeg/> Linux builds
- <https://www.gyan.dev/ffmpeg/builds/> Windows builds
- <https://evermeet.cx/ffmpeg/> MacOS builds

## v3 vs v1

Version 3 of this action downloads binaries directly from the sources listed above
instead of periodically updating GitHub releases. In turn this means it receives
updates more frequently and supports older versions and git releases.

## Usage

To use `ffmpeg` and `ffprobe`, run the action before them.
See [`action.yml`](./action.yml).

```yml
steps:
Expand All @@ -17,30 +27,25 @@ steps:
with:
# A specific version to download, may also be "release" or a specific version
# like "6.1.0". At the moment semver specifiers (i.e. >=6.1.0) are supported
# only on Windows, on other platforms the version is matched exactly.
# only on Windows, on other platforms they are allowed but version is matched
# exactly.
# As of version 3, this action -- by default -- uses the latest release version
# available for the platform. As upstream sources are not guaranteed to update
# at the same time, the action may install different versions of ffmpeg for
# different operating systems, unless a specific version is requested.
# Default: "release"
ffmpeg-version: release
# Target architecture of the ffmpeg executable to install. Defaults to the
# system architecture. Only x64 and arm64 are supported (arm64 only on Linux).
architecture: ''
# As of version 3 of this action, builds are no longer downloaded from GitHub
# except on Windows: https://github.com/GyanD/codexffmpeg/releases.
# Default: ${{ github.token }}
github-token: ${{ github.token }}
github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }}
- run: ffmpeg -i input.avi output.mkv
```
This action also sets a few outputs:
- `path`: Path to the install directory
- `ffmpeg-path`: Path to the ffmpeg executable
- `ffprobe-path`: Path to the ffprobe executable

## FFmpeg Version

The action downloads builds from the following sources depending on the platform:
### Outputs
- Linux Builds - <https://johnvansickle.com/ffmpeg/>
- Windows Builds - <https://www.gyan.dev/ffmpeg/builds/>
- MacOS Builds - <https://evermeet.cx/ffmpeg/>
- `ffmpeg-version`: Installed version of FFmpeg.
- `ffmpeg-path`: Path to the install directory containing `ffmpeg` and `ffprobe`
commands.
- `cache-hit`: A boolean value indicating whether the tool cache was hit.

0 comments on commit f0ec839

Please sign in to comment.