https://github.com/animmouse/setup-youtube-dl
Setup/Install youtube-dl for GitHub Actions
https://github.com/animmouse/setup-youtube-dl
Last synced: about 1 year ago
JSON representation
Setup/Install youtube-dl for GitHub Actions
- Host: GitHub
- URL: https://github.com/animmouse/setup-youtube-dl
- Owner: AnimMouse
- License: mpl-2.0
- Created: 2021-03-31T10:22:16.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-01T07:17:35.000Z (almost 3 years ago)
- Last Synced: 2025-02-28T20:15:35.323Z (about 1 year ago)
- Language: PowerShell
- Homepage: https://github.com/marketplace/actions/setup-youtube-dl
- Size: 27.3 KB
- Stars: 8
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup youtube-dl for GitHub Actions
Setup [youtube-dl](https://github.com/ytdl-org/youtube-dl) on GitHub Actions to use `youtube-dl`.
This action installs [youtube-dl](https://github.com/ytdl-org/youtube-dl) for use in actions by installing it on tool cache using [AnimMouse/tool-cache](https://github.com/AnimMouse/tool-cache).
This action is implemented as a [composite](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) action.
## Deprecation
This action is deprecated, please use [AnimMouse/setup-yt-dlp](https://github.com/AnimMouse/setup-yt-dlp) instead.
## Usage
To use `youtube-dl`, run this action before `youtube-dl`.
```yaml
steps:
- name: Setup youtube-dl
uses: AnimMouse/setup-youtube-dl@v1
- run: youtube-dl https://www.youtube.com/watch?v=BaW_jenozKc
```
## FFmpeg
To improve youtube-dl's handling of formats like merging `bestvideo+bestaudio` instead of just using `best`, it is recommended to install FFmpeg first by using [AnimMouse/setup-ffmpeg](https://github.com/AnimMouse/setup-ffmpeg).
```yaml
steps:
- name: Setup FFmpeg
uses: AnimMouse/setup-ffmpeg@v1
- name: Setup youtube-dl
uses: AnimMouse/setup-youtube-dl@v1
- run: youtube-dl https://www.youtube.com/watch?v=BaW_jenozKc
```
### Specific version
You can specify the version you want. By default, this action downloads the latest version if version is not specified.
```yaml
steps:
- name: Setup youtube-dl
uses: AnimMouse/setup-youtube-dl@v1
with:
version: 2021.02.04
```
### GitHub token
This action automatically uses a GitHub token in order to authenticate with GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.
```yaml
steps:
- name: Setup youtube-dl
uses: AnimMouse/setup-youtube-dl@v1
with:
token: ${{ secrets.GH_PAT }}
```