metube
metube copied to clipboard
please support aria2c
please support aria2c and ensure that progress bar run as usual
MeTube is a GUI for yt-dlp, so all the actual downloading is performed by yt-dlp and MeTube does not have control over that. I see some mentions of aria2c in the documentation, and it appears that you can make it use aria2c via the external_downloader option (which you can set via the YTDL_OPTIONS environment variable), but whether it works or whether download progress is reported is wholly dependent on yt-dlp, and there's nothing MeTube can do in this regard.
Any chance you'll reconsider this? Adding support for aria2 as a downloader (changes what's on stdout) would be huge for performance.
If it doesn't depend on MeTube, how can I reconsider it?
Well metube container will need to include the deps and it'll need to parse the output from stdout to report progress.
I understand. I don't mind having this in MeTube then, assuming the dependencies aren't too heavy and are cross-platform (i.e. installed via apk or pip). Someone will have to take up the gauntlet and submit a PR, since I don't think I'll have the time to do it myself anytime soon. I'll reopen the issue and label it accordingly.
I just added aria2 to docker (apk add aria2), and set options YTDL_OPTIONS={"external_downloader":"aria2c"}, everything seems to work.
but I don't know what the next step is. fyi
So the stdout parsing business doesn't need changes, it just works as is? @PikuZheng , do you see the percentage progressing during the download when aria2c is used? (Is it used for sure when you enabled this option in YTDL_OPTIONS?)
yes it works.
INFO:ytdl:adding https://youtu.be/BSCXnJbeLYQ
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = k-elINGi1Gtvc_WsdJ ; player = https://www.youtube.com/s/player/4c3f79c5/player_ias.vflset/en_US/base.js
INFO:ytdl:downloading 【大食い】これが私の「超ミックスフライ定食」だ。最高だろ?〜4種のタルタルソースを添えて〜【モッパン】【MUKBANG】
INFO:aiohttp.access:3.81.62.76 [13/Aug/2022:11:29:14 +0000] "POST /ytdl/add HTTP/1.1" 200 186 "-" "-"
WARNING: [youtube] nsig extraction failed: You may experience throttling for some formats
n = WHE8HzmiU1Doc55s-M ; player = https://www.youtube.com/s/player/4c3f79c5/player_ias.vflset/en_US/base.js
[#2ff376 48KiB/428MiB(0%) CN:3 DL:96KiB ETA:1h15m30s]
[#2ff376 0.9MiB/428MiB(0%) CN:3 DL:656KiB ETA:11m6s]
[#2ff376 3.6MiB/428MiB(0%) CN:3 DL:1.4MiB ETA:4m48s]
.....
INFO:ytdl:waiting for item to download
There is only one problem, the webui doesn't know the download progress, it only knows the download start and finished.
Also according to yt-dlp's issues, downloading with aria2c may not save to subfolders.
OK, I added aria2 to the Dockerfile, so @10362227 and @karan , if you want to use it, just set your YTDL_OPTIONS as @PikuZheng showed above, and with the mentioned limitations, it will work. stdout parsing will probably never happen, because MeTube doesn't use stdout for progress, it uses yt-dlp's internal reporting via the python module. But if you prefer to use aria2 in any case, you have the option now.