Reputation: 5089
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.
Upvotes: 9
Views: 28309
Reputation: 917
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'
Upvotes: 1
Reputation: 23
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
Upvotes: 0
Reputation: 5089
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
Upvotes: 10
Reputation: 28405
Try:
cd C:\Users\Josue\Downloads
C:\youtube-dl\youtube-dl --etc
Upvotes: 1