ziahamza / webui-aria2

The aim for this project is to create the worlds best and hottest interface to interact with aria2. Very simple to use, just download and open index.html in any web browser.
MIT License
9.93k stars 1.47k forks source link

[enhancement] inclusion of youtube-dl #275

Closed monk-blade closed 6 years ago

monk-blade commented 7 years ago

It would be great to include youtube-dl wrapper with aria2 as external downloader.

roo79x commented 7 years ago

I think that would be a great idea. I've been thinking about this as well, but I don't have any knowledge of how hard it would be to get working. I do know youtube-dl has --external-downloader and --external-downloader-args so youtube-dl can use the specified external downloader and aria2c is supported see here > https://github.com/rg3/youtube-dl#download-options I guess my first question would be. If youtube-dl is able to pass to aria2 is there a way to pass the right commands to youtube-dl through webui-aria2 and still get anything required by webui-aria2 to function as the developer expects?. Anyway hope this is able work. Thanks Roo

TheNicholasNick commented 7 years ago

there is no way for this to work with webui-aria2 in it's current form (static html running on the client)...

the aria2 rpc interface doesn't allow the spawning of external commands/processes - https://aria2.github.io/manual/en/html/aria2c.html#methods

it is out of scope for this project really. youtube-dl works like this

  1. given a url
  2. go to youtube page
  3. parse for urls to media
  4. select the url needed based on format requested
  5. spawn download use internal/external downloader, wait for the file to arrive
  6. transform it using ffmpeg if needed or as requested
  7. exit or go to step 1

Because the bit we want to happen is step 5, it is really a minor part of the youtube-dl process and a different tool is really required to setup youtube-dl via the browser. this different tool would be a great candidate for including a UI to the aria2 rpc interface like how webui-aria2 works, not the other way around.