NickvisionApps / Parabolic

Download web video and audio
https://flathub.org/apps/details/org.nickvision.tubeconverter
GNU General Public License v3.0
1.04k stars 56 forks source link

Add support for external downloaders #29

Closed VarLad closed 1 year ago

VarLad commented 2 years ago

Problem

While yt-dlp works awesome for Youtube, some sites have different download formats. Many times, downloads from the said websites is really slow. yt-dlp supports external downloaders. Taking the aria2 downloader for example, it supports features like multi-threading, cross-platform resuming, download speed limiting, among lots of other features. It works well for other sites as well as external sites.

How we use it with yt-dlp is: yt-dlp --external-downloader aria2c --external-downloader-args "aria2c:-x 16 -k 1M" "Video link here"

Feature Request

I've two feature requests for this issue

nlogozzo commented 1 year ago

@fsobolev @DaPigGuy maybe we just use aria2c as the default downloader since it has a lot of nice features over the yt-dlp default?

fsobolev commented 1 year ago

I don't mind. Need to investigate how to use an external downloader with new backend.

fsobolev commented 1 year ago

https://github.com/scx/uget-flatpak/blob/master/aria2.yaml - example of aria2 in flatpak manifest (we don't need --enable-bittorrent but not sure if anything else should be changed)

nlogozzo commented 1 year ago

https://github.com/nlogozzo/NickvisionTubeConverter/releases/tag/2023.4.2-beta1

VarLad commented 1 year ago

@nlogozzo Any idea if this could be reopened? The original feature request was to implement some options of aria2 as well, like multipart downloading (the number 16 in the command) and minimal split size (1MB in this case) of each part

fsobolev commented 1 year ago

@nlogozzo Any idea if this could be reopened? The original feature request was to implement some options of aria2 as well, like multipart downloading (the number 16 in the command) and minimal split size (1MB in this case) of each part

-x16 is added by yt-dlp. We can add -k as well. Should it be hardcoded or do you think it would be better to allow configuring in settings? This is the full command that TC actually runs:

 /usr/bin/aria2c -c --console-log-level=warn --summary-interval=0 --download-result=hide --http-accept-gzip=true --file-allocation=none -x16 -j16 -s16 --allow-overwrite=true --allow-piece-length-change=true --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' --header 'Accept-Language: en-us,en;q=0.5' --header 'Sec-Fetch-Mode: navigate' --max-overall-download-limit=0K --allow-overwrite=true --show-console-readout=false --stop-with-process=<...> --dir <...> --auto-file-renaming=false --file-allocation=none --uri-selector=inorder -i <...>
VarLad commented 1 year ago

@fsobolev I believe having the ability to configure both -x and -k by the user would be really convenient