Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

youtube-dl download location

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.

like image 593
Josue Espinosa Avatar asked Dec 24 '14 18:12

Josue Espinosa


3 Answers

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
like image 138
Josue Espinosa Avatar answered Oct 17 '22 04:10

Josue Espinosa


Try:

cd C:\Users\Josue\Downloads
C:\youtube-dl\youtube-dl --etc
like image 22
Steve Barnes Avatar answered Oct 17 '22 02:10

Steve Barnes


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' 
like image 36
Krish Avatar answered Oct 17 '22 02:10

Krish