I am using the youtube-dl library for converting videos to mp3, and looking to speed up the conversion & downloading process.
(Recently read about --external-downloader aria2c(to speed downloads) with youtube-dl, and found it super amazing. but since my sites hosted on pythonanywhere, they don't provide access to ROOT(admin) to install these packages).
There are several external-downloaders supported by youtube-dl like curl,wget,httpie.
Since,(I was not able to install aria2c), I decided to try 'curl':
Here's the code, I have tried for my application:
ydl_opts = {
'format': 'worstaudio/worst',
'postprocessors': [{'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192'}],
'outtmpl': 'media/'+result,
'noplaylist':True,
'ignoreerrors':True,
'max-downloads':1,
'external-downloader':'curl'
}
ydl = youtube_dl.YoutubeDL(ydl_opts)
But, that seems nothing has improved, also (I am not able to understand if it is correct or not) (referred the youtube-dl documentation, but didn't find anything helpful with this).
Can anybody help me, where am I going wrong?
Also, is there anything that can be done to boost speed for youtube-dl downloads?