Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Is it possible for the console progress output to be % of the total operation rather than % of each fragment? #21253
Comments
youtube-dl already report the estimated progress of the full download not the progress for fragment download. |
|
Thanks for getting back to me. Can you help me understand this output I get: [youtube] Nhw0NfSf3D0: Downloading webpage |
|
as I said in the case of fragmented streams, the progress is estimated, it tries to calculate approximately the size of the full download based on the size of the downloaded fragments and report the total progress of the download. |
|
Thanks, I just mean that it goes all the way up to 100% and then seems to start again from the bottom and build up to 100%? |
|
You are downloading two media files (video and audio) in a row. |
|
Thank you for explaining. |
Question
Is it possible for the console progress output to be % of the total operation rather than % of each fragment?
I am writing a web tool that uses youtube-dl. It runs youtube-dl on a post request from my main app page. Sometimes users request a very large file and the download takes so long the request times out before my youtube-dl endpoint page can respond to the post, so I have rewritten the endpoint page. Now it responds immediately to the POST request with the address of a logfile for the download and pipes the console output of youtube-dl to this logfile. Now on my main application page I can constantly GET request that logfile to see the progress of the download and serve the file to the user once it is complete.
I have not had any problems telling when the download is complete, but I want to also report the completion % to the user while it is in process. I can't tell what the % completion is though, because the console output of youtube-dl reports the % completion of each fragment, and not the % completion of the total operation. Is there any way to get the console output to report the % completion of the total operation?
Thanks and let me know if I can clarify anything.