How to get file download progress (file no., percentage, ETA and rate) #4853

Closed
opened 2026-02-21 02:24:47 -05:00 by deekerman · 7 comments
Owner

Originally created by @ghost on GitHub (Jun 11, 2015).

Is there a way to get file download progress in the terminal. The --console-title shows the progress and displays progress details in title.

youtube-dl --extract-audio --audio-quality 0 --console-title --audio-format mp3 <url>

But i want those details as an output in terminal and not in the title

eg: a="hello"; echo $a

is this possible

Originally created by @ghost on GitHub (Jun 11, 2015). Is there a way to get file download progress in the terminal. The --console-title shows the progress and displays progress details in title. `youtube-dl --extract-audio --audio-quality 0 --console-title --audio-format mp3 <url>` But i want those details as an output in terminal and not in the title eg: `a="hello"; echo $a` is this possible
Author
Owner

@yan12125 commented on GitHub (Jun 11, 2015):

Does --newline help?

@yan12125 commented on GitHub (Jun 11, 2015): Does `--newline` help?
Author
Owner

@ghost commented on GitHub (Jun 12, 2015):

@yan12125 no it doesnt help? how to fetch the percentage and ETA alone?

@ghost commented on GitHub (Jun 12, 2015): @yan12125 no it doesnt help? how to fetch the percentage and ETA alone?
Author
Owner

@jaimeMF commented on GitHub (Jun 12, 2015):

The progress is properly outputted to the terminal, could you post the output you get and the way you want to process it?

@jaimeMF commented on GitHub (Jun 12, 2015): The progress is properly outputted to the terminal, could you post the output you get and the way you want to process it?
Author
Owner

@ghost commented on GitHub (Jun 12, 2015):

@jaimeMF
youtube-dl --extract-audio --audio-quality 0 --newline --audio-format mp3 https://www.youtube.com/playlist?list=PL1C815DB73EC2678E

This is the out put

[youtube:playlist] PL1C815DB73EC2678E: Downloading webpage
[download] Downloading playlist: Less than 1 minute
[youtube:playlist] playlist Less than 1 minute: Collected 4 video ids (downloading 4 of them)
[download] Downloading video 1 of 4
[youtube] KNLwsqzFfNg: Downloading webpage
[youtube] KNLwsqzFfNg: Extracting video information
[youtube] KNLwsqzFfNg: Downloading DASH manifest
download] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a

[download]   0.4% of 231.51KiB at  6.10KiB/s ETA 00:30
[download]   1.1% of 231.51KiB at 27.07KiB/s ETA 00:10
[download]   4.0% of 231.51KiB at 19.24KiB/s ETA 00:04
[download]   6.5% of 231.51KiB at 75.06KiB/s ETA 00:03
[download]  13.4% of 231.51KiB at 98.22KiB/s ETA 00:03
[download]  28.7% of 231.51KiB at 81.40KiB/s ETA 00:02
[download]  61.7% of 231.51KiB at 91.56KiB/s ETA 00:01
[download]  86.2% of 231.51KiB at 82.96KiB/s ETA 00:00
[download] 100.0% of 231.51KiB at 73.21KiB/s ETA 00:00
[download] 100% of 231.51KiB in 00:02
[ffmpeg] Correcting container in "_1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
[avconv] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.mp3
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
Deleting original file _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a (pass -k to keep)
[download] Downloading video 2 of 4
[youtube] wTvXkMpJflk: Downloading webpage
[youtube] wTvXkMpJflk: Extracting video information
[youtube] wTvXkMpJflk: Downloading DASH manifest
etc
etc

and i wand only
Downloading video 1 of 4 [download] Downloading video 2 of 4

as $files1

FIRST FILE

file =1 
per      time             rate
0.40%   00:30:00    6.10KiB/s
1.10%   00:10:00    27.07KiB/s
4.00%   00:04:00    19.24KiB/s
6.50%   00:03:00    75.06KiB/s
13.40%  00:03:00    98.22KiB/s
28.70%  00:02:00    81.40KiB/s
61.70%  00:01:00    91.56KiB/s
86.20%  00:00:00    82.96KiB/s
100.00% 00:00:00    231.51KiB

SECOND, THIRD...FILES

As separate variable $file, $per, $time, $rate
i know we can use awk but for this complicated output how should i do

@ghost commented on GitHub (Jun 12, 2015): @jaimeMF `youtube-dl --extract-audio --audio-quality 0 --newline --audio-format mp3 https://www.youtube.com/playlist?list=PL1C815DB73EC2678E` This is the out put ``` [youtube:playlist] PL1C815DB73EC2678E: Downloading webpage [download] Downloading playlist: Less than 1 minute [youtube:playlist] playlist Less than 1 minute: Collected 4 video ids (downloading 4 of them) [download] Downloading video 1 of 4 [youtube] KNLwsqzFfNg: Downloading webpage [youtube] KNLwsqzFfNg: Extracting video information [youtube] KNLwsqzFfNg: Downloading DASH manifest download] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a [download] 0.4% of 231.51KiB at 6.10KiB/s ETA 00:30 [download] 1.1% of 231.51KiB at 27.07KiB/s ETA 00:10 [download] 4.0% of 231.51KiB at 19.24KiB/s ETA 00:04 [download] 6.5% of 231.51KiB at 75.06KiB/s ETA 00:03 [download] 13.4% of 231.51KiB at 98.22KiB/s ETA 00:03 [download] 28.7% of 231.51KiB at 81.40KiB/s ETA 00:02 [download] 61.7% of 231.51KiB at 91.56KiB/s ETA 00:01 [download] 86.2% of 231.51KiB at 82.96KiB/s ETA 00:00 [download] 100.0% of 231.51KiB at 73.21KiB/s ETA 00:00 [download] 100% of 231.51KiB in 00:02 [ffmpeg] Correcting container in "_1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a" WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors. [avconv] Destination: _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.mp3 WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors. Deleting original file _1 min. - Amendes pour les particules du LHC-KNLwsqzFfNg.m4a (pass -k to keep) [download] Downloading video 2 of 4 [youtube] wTvXkMpJflk: Downloading webpage [youtube] wTvXkMpJflk: Extracting video information [youtube] wTvXkMpJflk: Downloading DASH manifest etc etc ``` and i wand only `Downloading video 1 of 4 [download] Downloading video 2 of 4` as $files1 FIRST FILE ``` file =1 per time rate 0.40% 00:30:00 6.10KiB/s 1.10% 00:10:00 27.07KiB/s 4.00% 00:04:00 19.24KiB/s 6.50% 00:03:00 75.06KiB/s 13.40% 00:03:00 98.22KiB/s 28.70% 00:02:00 81.40KiB/s 61.70% 00:01:00 91.56KiB/s 86.20% 00:00:00 82.96KiB/s 100.00% 00:00:00 231.51KiB ``` SECOND, THIRD...FILES As separate variable $file, $per, $time, $rate i know we can use `awk` but for this complicated output how should i do
Author
Owner

@dstftw commented on GitHub (Jun 12, 2015):

Generally, you should use an API. I see little sense overcomplexing progress output with template similar to -o.

@dstftw commented on GitHub (Jun 12, 2015): Generally, you should use an [API](https://github.com/rg3/youtube-dl/blob/a55e36f48d1f0dc5454b144c7373361f284b9236/youtube_dl/YoutubeDL.py#L206-L229). I see little sense overcomplexing progress output with template similar to `-o`.
Author
Owner

@jaimeMF commented on GitHub (Jun 12, 2015):

Currently you have the option to parse the youtube-dl output or use the python api as @dstftw has mentioned. I'm closing this issue as a duplicate of #152, if we implement it we would offer the download progress as a json output.

@jaimeMF commented on GitHub (Jun 12, 2015): Currently you have the option to parse the youtube-dl output or use the python api as @dstftw has mentioned. I'm closing this issue as a duplicate of #152, if we implement it we would offer the download progress as a json output.
Author
Owner

@ghost commented on GitHub (Jun 12, 2015):

I am a little bit confuesed, API and PHP is used for web application right. I have installed youtube-dl in my ubuntu system

@ghost commented on GitHub (Jun 12, 2015): I am a little bit confuesed, API and PHP is used for web application right. I have installed youtube-dl in my ubuntu system
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#4853
No description provided.