I'm following the documentation on using youtube-dl
from a python script.
But I can't seem to get the output option, specifying the folder I want the download to go into to work:
ydl_opts = {'output':'video'}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url])
I've also tried replacing output
with o
and -o
.
outtmpl
(notoutput
) is a template for the video file name, not a directory. An output template value of'video'
instructs youtube-dl to write the video a file literally called video. Try something likeIf you want to know the name of further options, have a look at the list of options. For more information on the output template, refer to the documentation.