Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress for --dump-json #5400

Open
kuerbis opened this issue Apr 11, 2015 · 6 comments
Open

Progress for --dump-json #5400

kuerbis opened this issue Apr 11, 2015 · 6 comments
Labels

Comments

@kuerbis
Copy link

@kuerbis kuerbis commented Apr 11, 2015

Would it be possible to add a progress bar when fetching the data for a channel- or a playlist-json-dump (--dump-json)?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 11, 2015

This would require tweaking each extractor capable to process channel/playlist. Moreover it's not always possible to know the size of a playlist beforehand to calculate an upper bound.

@jaimeMF jaimeMF added the request label Apr 11, 2015
@Kilobyte22
Copy link

@Kilobyte22 Kilobyte22 commented May 17, 2015

Generally i think what would be beneficial would be if there was an option to stream the progress bar as json. This could be done in a way that you can easily do this without a streaming parser:

[{"percent": 0.1, "eta": 600, "speed": 64839}
,{"percent": 1.3, "eta": 595, "speed": 192624}
...
]

To parse, split by line and remove the first char or dump it into a streaming parser. This would allow easier interaction from other programs with youtube-dl

@royale1223
Copy link

@royale1223 royale1223 commented Sep 29, 2016

@dstftw Any news / plans regarding this issue?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 29, 2016

Neither.

@ciffelia
Copy link

@ciffelia ciffelia commented Mar 23, 2020

@dstftw I'm interesting in this feature and would like to contribute. I think it would be nice to add --dump-progress-json option to stream progress in JSON Lines format (aka LDJSON or NDJSON).
e.g.

$ youtube-dl --dump-progress-json <URL>
{ "status": "downloading", "downloaded_bytes": 1024, "total_bytes": 12345, ... }
{ "status": "downloading", "downloaded_bytes": 8192, "total_bytes": 12345, ... }
{ "status": "finished", "downloaded_bytes": 12345, "total_bytes": 12345, ... }

(JSON entries are the same as those passed to progress_hooks)

Is it okay?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 23, 2020

No, progress hook is for file downloading only. Also such progress reporting for JSON is useless since it does not reflect the actual traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.