Is there a way to dynamically change aria2c's min split size based on file size?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm newbie and trying to use aria2 as my downloader in android device using termux, so I create this bash script for easy write (I don't know too much).



#!/system/bin/sh
download() aria2c $link
--dir=/sdcard/Download/
--force-sequential=true
--file-allocation=none
--continue=true
--max-concurrent-downloads=16
--min-split-size=20M
--max-connection-per-server=16
--split=16


loop()
echo "Do you wish to download more new files? [1 or 2]"
select yn in "Yes" "No"; do
case $yn in
Yes ) download; loop;
break;;
No ) echo "Exiting...!";
exit;;
esac
done


download
loop


Then the thing is I noticed that depends on file size min split size give different result, when its like 5-100MB file, min split size 1MB gives optimum result for me and for 400+MB file, min split size 20MB gives optimum result while 100-400MB, min split size 5 or 10MB gives optimum result. So is there a way to dynamically change it with bash or maybe other way?



PS:If there is a way to do that, can I implement it to youtube-dl (or any others that can use external downloader) using aria2 as it downloader?







share|improve this question

























    up vote
    0
    down vote

    favorite












    I'm newbie and trying to use aria2 as my downloader in android device using termux, so I create this bash script for easy write (I don't know too much).



    #!/system/bin/sh
    download() aria2c $link
    --dir=/sdcard/Download/
    --force-sequential=true
    --file-allocation=none
    --continue=true
    --max-concurrent-downloads=16
    --min-split-size=20M
    --max-connection-per-server=16
    --split=16


    loop()
    echo "Do you wish to download more new files? [1 or 2]"
    select yn in "Yes" "No"; do
    case $yn in
    Yes ) download; loop;
    break;;
    No ) echo "Exiting...!";
    exit;;
    esac
    done


    download
    loop


    Then the thing is I noticed that depends on file size min split size give different result, when its like 5-100MB file, min split size 1MB gives optimum result for me and for 400+MB file, min split size 20MB gives optimum result while 100-400MB, min split size 5 or 10MB gives optimum result. So is there a way to dynamically change it with bash or maybe other way?



    PS:If there is a way to do that, can I implement it to youtube-dl (or any others that can use external downloader) using aria2 as it downloader?







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm newbie and trying to use aria2 as my downloader in android device using termux, so I create this bash script for easy write (I don't know too much).



      #!/system/bin/sh
      download() aria2c $link
      --dir=/sdcard/Download/
      --force-sequential=true
      --file-allocation=none
      --continue=true
      --max-concurrent-downloads=16
      --min-split-size=20M
      --max-connection-per-server=16
      --split=16


      loop()
      echo "Do you wish to download more new files? [1 or 2]"
      select yn in "Yes" "No"; do
      case $yn in
      Yes ) download; loop;
      break;;
      No ) echo "Exiting...!";
      exit;;
      esac
      done


      download
      loop


      Then the thing is I noticed that depends on file size min split size give different result, when its like 5-100MB file, min split size 1MB gives optimum result for me and for 400+MB file, min split size 20MB gives optimum result while 100-400MB, min split size 5 or 10MB gives optimum result. So is there a way to dynamically change it with bash or maybe other way?



      PS:If there is a way to do that, can I implement it to youtube-dl (or any others that can use external downloader) using aria2 as it downloader?







      share|improve this question













      I'm newbie and trying to use aria2 as my downloader in android device using termux, so I create this bash script for easy write (I don't know too much).



      #!/system/bin/sh
      download() aria2c $link
      --dir=/sdcard/Download/
      --force-sequential=true
      --file-allocation=none
      --continue=true
      --max-concurrent-downloads=16
      --min-split-size=20M
      --max-connection-per-server=16
      --split=16


      loop()
      echo "Do you wish to download more new files? [1 or 2]"
      select yn in "Yes" "No"; do
      case $yn in
      Yes ) download; loop;
      break;;
      No ) echo "Exiting...!";
      exit;;
      esac
      done


      download
      loop


      Then the thing is I noticed that depends on file size min split size give different result, when its like 5-100MB file, min split size 1MB gives optimum result for me and for 400+MB file, min split size 20MB gives optimum result while 100-400MB, min split size 5 or 10MB gives optimum result. So is there a way to dynamically change it with bash or maybe other way?



      PS:If there is a way to do that, can I implement it to youtube-dl (or any others that can use external downloader) using aria2 as it downloader?









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jul 11 at 1:51









      muru

      33.1k576139




      33.1k576139









      asked Jul 11 at 1:45









      Calendar

      12




      12

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454592%2fis-there-a-way-to-dynamically-change-aria2cs-min-split-size-based-on-file-size%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f454592%2fis-there-a-way-to-dynamically-change-aria2cs-min-split-size-based-on-file-size%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?