Skip to content

Show yt-dlp downloads as one steady progress bar - #18648

Merged
dhh merged 2 commits into
quattrofrom
ytdlp-steady-progress
Nov 12, 2026
Merged

dhh merged 2 commits into
quattrofrom
ytdlp-steady-progress

Conversation

@dhh

@dhh dhh commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Downloading a YouTube video from Chromium showed the progress bar jump to 100%, drop back to 0, climb again, then reset once more near the end.

  • The early 100%: YouTube's video arrives over HLS, and yt-dlp's first report for it reads 100% at chunk 0, before anything has downloaded.
  • The reset at the end: yt-dlp downloads the audio as a second stream, with its own 0-100% run.

omarchy-chromium-ytdlp-host now shows one bar:

  • It asks yt-dlp which formats it picked (616+251 is two streams) and tags each progress report with its stream and status.
  • The video fills the first 90% and the audio the rest.
  • A 100% reported while still downloading is dropped, since a real finish always arrives as its own finished report.
  • The bar never moves backwards, which also hides yt-dlp's wobble while it estimates the size of a chunked stream.

On the video that showed the problem, the bar now climbs steadily from 0 to 99 before the completion toast.

🤖 Generated with Claude Code

YouTube's video arrives over HLS, whose first progress report reads 100%
before any chunk lands, and yt-dlp then downloads the audio as a second
stream that runs 0-100% again. The OSD showed each of those as-is.

Fold the streams into one bar (video fills 90%, audio the rest), drop the
bogus 100% while still downloading, and never move the bar backwards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] The PR appears safe to merge.

Summary

The PR combines video and audio downloads into one forward-only progress bar.

  • Chromium downloads show video and audio in one steady progress bar.

Reviews (3) · Last reviewed commit: "Keep a stalled yt-dlp bar on screen and ..." · Reviewed by Greptile

Comment thread bin/omarchy-chromium-ytdlp-host Resolved
Comment thread test/shell.d/chromium-ytdlp-test.sh Resolved
A stretch that doesn't advance the bar, such as a slow audio stream that
moves it a point per 10%, now redraws every few seconds so the OSD's 8s
timeout doesn't hide it. Throttle before folding the percent so a long
HLS download doesn't fork per report, and assert the host asks yt-dlp
for the stream and progress records the stub replays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit bae7769 into quattro Nov 12, 2026
3 checks passed
@dhh
dhh deleted the ytdlp-steady-progress branch November 12, 2026 13:53
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