I'm using aria2 to perform basic downloads. In the documentation it specifies the console readout format to be:

[#2089b0     400.0KiB/33.2MiB(1%)     CN:1     DL:115.7KiB     ETA:4m51s]

This format is fairly readable, but as it's going to be used by end users, it would be easier as just:

400.0KiB/33.2MiB  (1%)   ETA:4m51s

As I'm using this in a batch-file, I thought about using a for /f loop to extract the data and then parse it. As far as I know, you can only use static data in a for /f loop, ie. it doesn't support formatting in realtime output from a command.

I can't seem to find any documentation on how to change the format using command line options, but do command line options exist to change the format of the console readout? or would I have to create modified version of aria2 and recompile?


I'm afraid you cannot change the format of console readout in aria2, there are no options to control it.

If you pipe the output of aria2c, it suppresses readout as well as log. So the best option is probably to suppress console readout with --show-console-readout option set to false.

To reduce the number of messages printed, you can also decrease console log level with --console-log-level.

To control how often aria2 prints current download summary, use --summary-interval option.

Your command can look like this:

aria2c --show-console-readout=false --console-log-level=warn --summary-interval=5 <url>

Every 5 seconds aria2 will print download stats. To filter other output you can use find "ETA:" and then parse it with for /f.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.