Skip to content

Add --duration-limit option + Add "no formats" cacheing - #591

Open
kristian-kiraly wants to merge 2 commits into
scdl-org:masterfrom
kristian-kiraly:master
Open

Add --duration-limit option + Add "no formats" cacheing#591
kristian-kiraly wants to merge 2 commits into
scdl-org:masterfrom
kristian-kiraly:master

Conversation

@kristian-kiraly

@kristian-kiraly kristian-kiraly commented Jul 8, 2026

Copy link
Copy Markdown

What this does

Adds a --duration-limit CLI option that skips tracks longer than a specified duration and adds a --skip-known-drm option that creates a similar archive that skips tracks already known to not have valid formats available

Usage

scdl -l <url> --duration-limit 10:00 --skip-known-drm

Accepts MM:SS or HH:MM:SS format.

Implementation

Under the hood this translates into a yt-dlp --match-filters expression (duration <= N), so tracks over the limit are filtered out before download rather than downloaded and then discarded. It composes correctly with --no-playlist, which also uses --match-filters — the two filters are combined with & rather than one overwriting the other.

Added a parameter to prevent downloading longer tracks when downloading from a playlist
Stores an archive of videos that return "No formats" so they can be skipped on future runs
@kristian-kiraly kristian-kiraly changed the title Add --duration-limit option Add --duration-limit option + Add "no formats" cacheing Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant