youtube-dl download location
Asked Answered
L

5

9

I am trying to save youtube videos as MP3's in my downloads folder. However, this ends up saving files in the same directory as youtube-dl.

youtube-dl --extract-audio --audio-format mp3 --audio-quality=320k 
https://www.youtube.com/watch?v=VIDEO_ID 
--output C:/Users/Josue/Downloads/%(title)s.%(ext)s

I wanted the videos to save at:

C:/Users/Josue/Downloads/videotitle.mp3

however, they are saving as:

C:/youtube-dl/videotitle-videoID.mp3

Am I doing something incorrectly? I tried reading the documentation on Github, but I was still a bit confused.

Lexy answered 24/12, 2014 at 18:48 Comment(0)
L
10

I needed to put the options in the following order:

youtube-dl --output C:/Users/Josue/Downloads/%(title)s.%(ext)s
 --extract-audio --audio-format mp3 
 --audio-quality=320k https://www.youtube.com/watch?v=VIDEO_ID
Lexy answered 24/12, 2014 at 18:59 Comment(2)
The order of options is ignored by youtube-dl.Fivestar
@phihag, not really; the URL(s) must come after the options. In his original post, he was putting the output after the URL.Josiahjosias
U
1

Try:

cd C:\Users\Josue\Downloads
C:\youtube-dl\youtube-dl --etc
Urinalysis answered 24/12, 2014 at 18:53 Comment(1)
Or better, use pushd and popd.Josiahjosias
P
1

This worked for me (for a unix environment):

youtube-dl https://www.youtube.com/watch?v=<video_id> --extract-audio --audio-format mp3 -o '/var/www/html/audio/%(id)s.%(ext)s' 
Posy answered 23/11, 2017 at 23:35 Comment(0)
B
1

Windows - double %

%%(title)s.%%(ext)s

Bid answered 17/4, 2021 at 19:14 Comment(0)
G
0

you can create a configuration file to do this for you , just add those lines to your config file (if you have one, if not create it in C:/Users/Josue youtube-dl.conf) -o C:/Users/Josue/Downloads/%(title)s.%(ext)s . Link for details

Gaudette answered 20/8, 2017 at 23:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.