Skip to content

Commit ff21525

Browse files
authored
Merge pull request #450 from internetarchive/misty/yt-dlp_filter_-sr
yt-dlp: filter out superresolution videos
2 parents 06fc825 + 7153f44 commit ff21525

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

brozzler/ydl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ def ydl_postprocess_hook(d):
269269
"socket_timeout": 40,
270270
"progress_hooks": [maybe_heartbeat_site_last_claimed],
271271
"postprocessor_hooks": [ydl_postprocess_hook],
272+
# YouTube has started providing videos in upscaled "Super Resolution"
273+
# format, which we don't want to download. yt-dlp identifies these via
274+
# the -sr suffix on the format_id. We can filter these out from the
275+
# list without putting any other prerequisites on the results.
276+
# https://alexwlchan.net/til/2025/ignore-ai-scaled-videos/
277+
"format": "[format_id!*=-sr]",
272278
# https://github.com/yt-dlp/yt-dlp#format-selection
273279
# "By default, yt-dlp tries to download the best available quality..."
274280
# v.2023.07.06 https://www.reddit.com/r/youtubedl/wiki/h264/?rdt=63577

0 commit comments

Comments
 (0)