ytdlp-audio

n8n community node to download YouTube audio (optionally full video) via yt-dlp, returned as binary data.

Package Information

Released: 3 mo ago
Downloads: 0 weekly / 0 monthly
Latest Version: 0.1.0

Documentation

@swoojeff/n8n-nodes-ytdlp-audio

n8n community node that downloads the audio track (optionally the full
video) from YouTube and other yt-dlp-supported
sites, and returns it as binary data on the workflow item.

Prerequisites

The n8n host must have these on PATH:

  • yt-dlp — pip install yt-dlp (or brew install yt-dlp)
  • ffmpeg — required for audio extraction / format conversion

Installation

In n8n: Settings → Community Nodes → Install and enter:

@swoojeff/n8n-nodes-ytdlp-audio

Usage

  1. Add the YouTube Audio (yt-dlp) node.
  2. Set Video URL.
  3. Choose Download Mode (Audio Only default, or Full Video).
  4. For audio, pick Audio Format (mp3 default; opus, m4a, wav, or
    best for the original stream with no re-encode) and Audio Quality.
  5. The downloaded file is placed on the binary property named in Binary
    Property
    (default data). Add a Write Binary File node (or an upload
    node) downstream to persist it.

Options

  • Cookies From Browser — use local browser cookies for age/region-restricted videos.
  • Proxy, Custom User-Agent.
  • Embed Metadata, Embed Thumbnail.
  • Output Filename Template — a yt-dlp -o template.

Output

  • binary[<Binary Property>]: the downloaded media file.
  • json: { id, title, ext, duration, uploader, filesize, webpageUrl, mode, downloadedExt }.

Development

npm install
npm run build
npm test
# real network smoke test (needs yt-dlp + ffmpeg):
RUN_YTDLP_E2E=1 npx jest nodes/YtDlpAudio/e2e.test.ts

License

MIT

Discussion