13
**

What do i need to add to specify that all the download mp3 will go to this directory: e:/python/downloadedsongs

ydl_opts = {
    'format': 'bestaudio/best',
    'download_archive': 'downloaded_songs.txt',
    'outtmpl': '%(title)s.%(ext)s',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
        }],
    'logger': MyLogger(),
    'progress_hooks': [my_hook],

}

if i understand it correctly outtmpl is for the template of the name of output file. **

Kamlesh
  • 2,032
  • 2
  • 19
  • 35
Reynard Asis
  • 463
  • 1
  • 3
  • 11

1 Answers1

30

outtmpl can contain directory names, simply set

'outtmpl': 'e:/python/downloadedsongs/%(title)s.%(ext)s',
  • How can we specify username and password? – Prashant Bhanarkar Aug 17 '16 at 19:12
  • @PrashantBhanarkar That's a separate question. Feel free to ask it on stackoverflow! Make sure you review the [list of available options](https://github.com/rg3/youtube-dl/blob/master/youtube_dl/YoutubeDL.py#L128-L278) beforehand. –  Aug 17 '16 at 19:18