Setup yt-dlp (a youtube-dl fork) on GitHub Actions to use yt-dlp.
This action installs yt-dlp for use in actions by installing it using pipx.
To use yt-dlp, run this action before yt-dlp.
steps:
- name: Setup yt-dlp
uses: AnimMouse/setup-yt-dlp@v1
- run: yt-dlp https://www.youtube.com/watch?v=BaW_jenozKcTo improve yt-dlp's handling of formats, like merging bestvideo+bestaudio instead of just using best, it is recommended to install FFmpeg by setting with-ffmpeg to true.
steps:
- name: Setup yt-dlp
uses: AnimMouse/setup-yt-dlp@v1
with:
with-ffmpeg: true
- run: yt-dlp https://www.youtube.com/watch?v=BaW_jenozKcFor Linux & Windows, this will install yt-dlp/FFmpeg-Builds with some patches necessary for smooth integration with yt-dlp using AnimMouse/tool-cache.
For macOS, you need to run FedericoCarboni/setup-ffmpeg as the built-in FFmpeg installer for macOS has been removed.
If you already installed FFmpeg in GitHub Runners, no need to set with-ffmpeg to true.
It is recommended to use aria2 as the downloader for yt-dlp, this will improve the downloading process and aria2 is already preinstalled in GitHub actions.
steps:
- name: Setup yt-dlp
uses: AnimMouse/setup-yt-dlp@v1
with:
with-ffmpeg: true
- run: yt-dlp --downloader aria2c https://www.youtube.com/watch?v=BaW_jenozKc