Aria2C Example Download Script To Download Latest FFMPEG

Posted at

aria2c is a console-multi-part download manager, very similar to cURL or wGET. It also allow you to download a single file, using multiple-partial segments, downloading the whole thing much faster (assuming the host isn't limiting download speed by IP, or block multipart downloads).

It also allows you to download same file from different hosts (for example a Ubuntu ISO, from few mirrors), or, simply multiple-files, from same and or different hosts with the additional of using http-pipeline to save on bandwidth, there are more stuff..

The multipart-download, may replace download-managers such as FlashGet, OrbitDownloader or (in some cases) jDownloader, mostly because it is simply script'able, you can even launch "callbacks" on several pin-points in download timeline.

I use it in plain Windows-CMD batch file, to download the latest FFMPEG from, including an unzip action at the end and moving some of the core-files.

There is an optional log.txt file creating, which may be useful for debug..
pre-locating using falloc is mostly for NTFS (not FAT32!) and newer file-OS,
You may download aria2c, and run it with --help for all of the other switches..

@echo off

if exist ".\\" (
del /f /q ".\\" >nul

D:\\dos\\parallel_aria2\\aria2c.exe ^
--split=5 ^
--min-split-size=1M ^
--file-allocation=falloc ^
--check-certificate=false ^
--continue=true ^
--max-connection-per-server=16 ^
--timeout=120 ^
--connect-timeout=120 ^
--max-tries=3 ^
--console-log-level=notice ^
--disable-ipv6=true ^
--human-readable=true ^
--retry-wait=1 ^
--enable-http-keep-alive=true ^
--enable-http-pipelining=true ^
--user-agent="Mozilla/5.0 Chrome" ^
--dir="." ^
--http-user=username ^
--http-passwd=password ^
--referer="" ^

::move executables, move entire preset as folder.
if exist ".\\" (
unzip ".\\"

move /y .\\ffmpeg-latest-win64-static\\bin\\*.exe .\\..
move /y .\\ffmpeg-latest-win64-static\\presets\\. .\\..

rmdir /s /q ".\\ffmpeg-latest-win64-static\\" >nul
del /f /q ".\\" >nul


:: --log=log.txt ^
:: --log-level=info ^