-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from FedericoCarboni/v3-preview
V3
- Loading branch information
Showing
22 changed files
with
59,154 additions
and
13,619 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"arrowParens": "always" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,53 @@ | ||
# 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. | ||
|
||
# Usage | ||
To use `ffmpeg` and `ffprobe`, run the action before them. | ||
This action sets up and caches a specific FFmpeg version, providing the `ffmpeg` | ||
and `ffprobe` commands. | ||
|
||
Builds are downloaded from 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 v2 | ||
|
||
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 git master builds and selecting a specific | ||
version. | ||
|
||
By default the latest release version available for the platform is used. As | ||
upstream sources are not guaranteed to update at the same time, the action may | ||
at times install different versions of ffmpeg for different operating systems, | ||
unless a specific version is requested. | ||
|
||
## Usage | ||
|
||
See [`action.yml`](./action.yml). | ||
|
||
```yml | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: FedericoCarboni/setup-ffmpeg@v2 | ||
- uses: FedericoCarboni/setup-ffmpeg@v3 | ||
id: setup-ffmpeg | ||
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 they are allowed but version is matched | ||
# exactly regardless. | ||
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. | ||
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 uses a recent FFmpeg build provided by the following sources: | ||
- Linux Builds - https://johnvansickle.com/ffmpeg/ | ||
- Windows Builds - https://www.gyan.dev/ffmpeg/builds/ | ||
- MacOS Builds - https://evermeet.cx/ffmpeg/ | ||
### Outputs | ||
**Note:** This action only supports x64 operating systems. | ||
- `ffmpeg-version`: Installed version of FFmpeg. | ||
- `ffmpeg-path`: Path to the install directory containing `ffmpeg` and `ffprobe` | ||
binaries. | ||
- `cache-hit`: A boolean value indicating whether the tool cache was hit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
name: Setup FFmpeg | ||
description: Setup FFmpeg in GitHub Actions | ||
|
||
description: 'Download, cache and add to PATH ffmpeg and ffprobe binaries.' | ||
author: Federico Carboni | ||
inputs: | ||
token: | ||
required: false | ||
default: ${{ github.token }} | ||
|
||
ffmpeg-version: | ||
description: 'Version of ffmpeg to use. Version Spec is only fully supported on Windows.' | ||
default: release | ||
architecture: | ||
description: 'Target architecture for FFmpeg, on Windows and MacOS only x64 is supported; on Linux arm64 may also be used. Defaults to the system architecture.' | ||
github-token: | ||
description: "Used to pull Windows builds from GyanD/codexffmpeg. Since there's a default, this is typically not supplied by the user." | ||
default: ${{ github.server_url == 'https://github.com' && github.token || '' }} | ||
outputs: | ||
ffmpeg-version: | ||
description: The installed ffmpeg version | ||
ffmpeg-path: | ||
description: Path to the ffmpeg binaries | ||
cache-hit: | ||
description: A boolean value to indicate whether the tool cache was hit | ||
runs: | ||
using: node16 | ||
using: node20 | ||
main: dist/index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// For testing with Jest | ||
module.exports = { | ||
presets: [['@babel/preset-env', { | ||
targets: {node: 'current'}, | ||
}]], | ||
}; |
Binary file not shown.
Oops, something went wrong.