AnimMouse / setup-yt-dlp

Setup/Install yt-dlp (a youtube-dl fork) for GitHub Actions

Home Page:https://github.com/marketplace/actions/setup-yt-dlp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup yt-dlp for GitHub Actions

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 on tool cache using AnimMouse/tool-cache.

This action is implemented as a composite action.

Usage

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_jenozKc

FFmpeg

To 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_jenozKc

For 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 AnimMouse/setup-ffmpeg first as yt-dlp/FFmpeg-Builds currently does not have macOS builds.

If you already installed FFmpeg in GitHub runners, no need to set with-ffmpeg to true.

aria2

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

Specific version

You can specify the version you want. By default, this action downloads the latest version if version is not specified.

steps:
  - name: Setup yt-dlp
    uses: AnimMouse/setup-yt-dlp@v1
    with:
      version: 2022.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.

steps:
  - name: Setup yt-dlp
    uses: AnimMouse/setup-yt-dlp@v1
    with:
      token: ${{ secrets.GH_PAT }}

About

Setup/Install yt-dlp (a youtube-dl fork) for GitHub Actions

https://github.com/marketplace/actions/setup-yt-dlp

License:Mozilla Public License 2.0


Languages

Language:PowerShell 57.8%Language:Shell 42.2%