As you can see from the actual output listed above, there already is string padding implemented, it is just done so in a broken way. Percentage downloaded is also padded.
I think that it would also be reasonable to limit the size of the speeds (convert 1000.00KiB/s
to 1.00MiB/s
) to save a character so the spacing doesn't look too big / awkward
Download speed causes jitter in terminal output
Checklist
Description
Encountered while downloading this video: https://www.youtube.com/watch?v=8qP2H1d8XXI
The download indicator in the terminal would jitter horizontally because the speed indicator seems to not be padded to a single size.
You can look at how the issue works in this REPL: https://replit.com/@DanielWood2/yt-dlp-console-speed?v=1 (uses functions from
common.py
andutils.py
)You can see how the current
format_speed
implementation does not properly pad the output string and leads to jitter on the download output.Verbose log