{"action":"opened","issue":{"url":"https://api.github.com/repos/Just-Some-Bots/MusicBot/issues/1066","repository_url":"https://api.github.com/repos/Just-Some-Bots/MusicBot","labels_url":"https://api.github.com/repos/Just-Some-Bots/MusicBot/issues/1066/labels{/name}","comments_url":"https://api.github.com/repos/Just-Some-Bots/MusicBot/issues/1066/comments","events_url":"https://api.github.com/repos/Just-Some-Bots/MusicBot/issues/1066/events","html_url":"https://github.com/Just-Some-Bots/MusicBot/issues/1066","id":223997086,"number":1066,"title":"Aria2c Integration","user":{"login":"zQueal","id":239193,"avatar_url":"https://avatars3.githubusercontent.com/u/239193?v=3","gravatar_id":"","url":"https://api.github.com/users/zQueal","html_url":"https://github.com/zQueal","followers_url":"https://api.github.com/users/zQueal/followers","following_url":"https://api.github.com/users/zQueal/following{/other_user}","gists_url":"https://api.github.com/users/zQueal/gists{/gist_id}","starred_url":"https://api.github.com/users/zQueal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zQueal/subscriptions","organizations_url":"https://api.github.com/users/zQueal/orgs","repos_url":"https://api.github.com/users/zQueal/repos","events_url":"https://api.github.com/users/zQueal/events{/privacy}","received_events_url":"https://api.github.com/users/zQueal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-25T01:52:08Z","updated_at":"2017-04-25T01:52:08Z","closed_at":null,"body":"`youtube-dl` has two specific command flags which easily facilitate the usage of an external download manager. Specifically [aria2c](https://aria2.github.io/) which enables you to specify `x` number of thread parts to download at once instead of simply using 1 thread. In some situations this can increase the downloading of audio data many fold.\r\n\r\n    youtube-dl -x --audio-format mp3 {youtube_url} --external-downloader aria2c --external-downloader-args --file-allocation=none --external-downloader-args -x6\r\n\r\n# Breakdown\r\n\r\n    -x\r\nextracts audio from provided YouTube url\r\n\r\n    --audio-format mp3 {youtube_url}\r\nspecifies we want mp3 formatted audio\r\n\r\n    --external-downloader aria2c\r\nspecifies the external downloader we want to use\r\n\r\n    --external-downloader-args --file-allocation=none\r\ndisables pre-allocation of file space\r\n\r\n    --external-downloader-args -x6\r\nwe want to split the mp3 file into `6` parts and download them all simultaneously\r\n________________________________\r\n\r\n[Aria2c static builds](https://github.com/q3aql/aria2-static-builds).\r\n\r\nAria2c is ubiquitous--so it should work on just about any platform.\r\n\r\n_________________________________\r\n\r\n### From `downloader.py`\r\n\r\n    def __init__(self, download_folder=None):\r\n            self.thread_pool = ThreadPoolExecutor(max_workers=2)\r\n                self.unsafe_ytdl = youtube_dl.YoutubeDL(ytdl_format_options)\r\n                self.safe_ytdl = youtube_dl.YoutubeDL(ytdl_format_options)\r\n                self.safe_ytdl.params['ignoreerrors'] = True\r\n                self.download_folder = download_folder\r\n\r\nIt seems by default there are 2 parallel task running at once so this may not be necessary--but would still be nice to have. "}}
{"actor":{"display_login":"zQueal"}}