No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Eddy Hintze 0a56be6670
All checks were successful
Lint / lint (push) Successful in 38s
security: allowlist extra_options instead of a denylist
2026-10-29 22:32:41 -04:00
.forgejo/workflows ci: add lint job, route just recipes through pre-commit 2026-07-24 18:45:01 -04:00
docs fix: cap playlist-only URLs at one entry, commit design spec, README wording 2026-06-12 19:52:38 -04:00
fw_nodes_ytdlp security: allowlist extra_options instead of a denylist 2026-10-29 22:32:41 -04:00
tests security: allowlist extra_options instead of a denylist 2026-10-29 22:32:41 -04:00
.gitignore chore: scaffold fw-nodes-ytdlp package 2026-06-12 19:22:41 -04:00
.pre-commit-config.yaml ci: add pre-commit ruff hooks 2026-07-24 18:40:04 -04:00
justfile deps: move dev deps to dependency-groups 2026-08-25 20:29:19 -04:00
pyproject.toml deps: move dev deps to dependency-groups 2026-08-25 20:29:19 -04:00
README.md security: allowlist extra_options instead of a denylist 2026-10-29 22:32:41 -04:00

fw-nodes-ytdlp

yt-dlp video/audio download and metadata nodes for Flowire workflow automation.

Installation

# Production: install from PyPI into the Flowire image/venv
pip install fw-nodes-ytdlp

# Local development: clone into the flowire-app workspace
git clone <repo-url> flowire-app/nodes/fw-nodes-ytdlp
cd flowire-app && uv sync --all-packages

Any installed package with flowire.nodes entry points is loaded automatically — no env var needed.

Nodes

Download Video

Download a single video from ~1800 yt-dlp supported sites into Flowire storage.

Inputs

Field Type Default Description
url string — Single video URL (playlists: use the List Playlist node)
quality best | 2160p | 1080p | 720p | 480p | smallest best Quality preset
custom_format string "" Advanced: raw yt-dlp format selector; overrides Quality when set
embed_metadata boolean false Embed title/chapters metadata into the file (via ffmpeg)
credential_id string "" Optional cookies credential for age-gated or members-only content
extra_options object {} Advanced: extra yt-dlp options merged into the request

Outputs

Field Type Description
file object Storage reference to the downloaded video
filename string Output filename
filesize_bytes integer File size in bytes
duration_seconds number | null Duration in seconds
title string Video title
ext string File extension
info object Trimmed yt-dlp metadata

Download Audio

Download audio (or extract it from a video) with optional transcoding via ffmpeg.

Inputs

Field Type Default Description
url string — Single video/audio URL (playlists: use the List Playlist node)
codec best | mp3 | m4a | opus | flac | wav best Audio codec (best keeps the source codec where possible)
bitrate_kbps integer 0 Target bitrate in kbps for lossy codecs (0 = encoder default)
credential_id string "" Optional cookies credential for age-gated or members-only content
extra_options object {} Advanced: extra yt-dlp options merged into the request

Outputs

Field Type Description
file object Storage reference to the audio file
filename string Output filename
filesize_bytes integer File size in bytes
duration_seconds number | null Duration in seconds
title string Title
ext string File extension
info object Trimmed yt-dlp metadata

Get Video Metadata

Extract title, duration, uploader, and more from a video URL without downloading.

Inputs

Field Type Default Description
url string — Video URL (any yt-dlp supported site)
include_formats boolean false Include the available formats list in the info output (can be large)
credential_id string "" Optional cookies credential for age-gated or members-only content
extra_options object {} Advanced: extra yt-dlp options merged into the request (e.g. {"geo_bypass": true})

Outputs

Field Type Description
title string | null Video title
uploader string | null Uploader/channel name
duration_seconds number | null Duration in seconds
upload_date string | null Upload date (YYYYMMDD)
view_count integer | null View count
like_count integer | null Like count
thumbnail string | null Best thumbnail URL
webpage_url string | null Canonical page URL
is_live boolean | null Whether this is a live stream
info object Full (trimmed) yt-dlp metadata

List Playlist / Channel

List all entries of a playlist or channel (auto-paginated) — pair with For Each to download in bulk.

Inputs

Field Type Default Description
url string — Playlist or channel URL (for channels, prefer the /videos tab URL — channel root URLs may return tab playlists as entries)
max_items integer 0 Maximum entries to return (0 = all; yt-dlp pages automatically)
credential_id string "" Optional cookies credential for private playlists
extra_options object {} Advanced: extra yt-dlp options merged into the request

Outputs

Field Type Description
items array Playlist entries: {url, id, title, duration_seconds, uploader}. Feed into For Each.
count integer Number of entries returned
playlist_title string | null Playlist/channel title

ffmpeg

Bundled via static-ffmpeg; binaries are downloaded on the first run that needs them (Download Video/Audio). No system install or Dockerfile change needed.

Cookies credential

Uses the "yt-dlp Cookies" credential type. Provide Netscape-format cookies.txt content exported via a browser extension (e.g. "Get cookies.txt LOCALLY"). Used for age-gated, members-only, or private content. Cookies expire — re-export when auth errors appear. Values are encrypted at rest and redacted from logs.

Timeouts & large files

Downloads run inside the node's timeout (default 300 s) — raise the per-node timeout for long videos (up to 24 h). Files pass through worker memory once when stored, so multi-GB downloads need a worker with commensurate RAM.

Bulk downloads

The download nodes accept a single video URL. Use List Playlist / Channel + For Each to fan out downloads across a playlist or channel.

Advanced: extra_options

A JSON object merged into yt-dlp opts, overriding presets. Only an allowlist of plain-data options is accepted; any other key fails the node with a message listing the allowed ones:

  • Format: format, format_sort, format_sort_force, prefer_free_formats, allow_multiple_video_streams, allow_multiple_audio_streams, merge_output_format
  • Network: retries, fragment_retries, extractor_retries, skip_unavailable_fragments, socket_timeout, ratelimit, throttledratelimit, http_chunk_size, concurrent_fragment_downloads, sleep_interval, max_sleep_interval, sleep_interval_requests, http_headers, impersonate, proxy, geo_verification_proxy, source_address, geo_bypass, geo_bypass_country, geo_bypass_ip_block
  • Filters: age_limit, min_filesize, max_filesize, min_views, max_views, playlist_items, playliststart, playlistend, playlistreverse, playlistrandom
  • Extractors and streams: extractor_args, live_from_start, hls_prefer_native, dynamic_mpd

Options that run commands or touch worker paths (postprocessors, exec_cmd, external_downloader, outtmpl, paths, cookiefile, netrc_location, cachedir, …) are refused on purpose.

Integration tests

uv run pytest -m integration   # requires network access

Development

just install     # deps
just lint        # linter
just format      # format
just test        # tests
just test-cov    # tests with coverage

Dependencies

  • yt-dlp - Video/audio download and metadata extraction
  • static-ffmpeg - Self-contained ffmpeg binaries (downloaded on first use)
  • flowire-sdk - Flowire node SDK