Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be possible to specify just an output directory #5472

Closed
mitchellmebane opened this issue Apr 20, 2015 · 1 comment
Closed

It should be possible to specify just an output directory #5472

mitchellmebane opened this issue Apr 20, 2015 · 1 comment

Comments

@mitchellmebane
Copy link

@mitchellmebane mitchellmebane commented Apr 20, 2015

Unless I've completely overlooked it (and who knows, maybe I have), there doesn't seem to be a way to change the output directory without also specifying a filename template:

C:\bin>youtube-dl -v -o "D:\\" https://www.youtube.com/watch?v=dQw4w9WgXcQ
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-o', u'D:\\', u'https://www.youtube.com/watch?v=dQw4w9WgXcQ']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.04.17
[debug] Python version 2.7.8 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-71329-g235589e, ffprobe N-71329-g235589e
[debug] Proxy map: {}
[youtube] dQw4w9WgXcQ: Downloading webpage
[youtube] dQw4w9WgXcQ: Extracting video information
[youtube] {43} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {18} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {5} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {36} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {17} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {135} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {244} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {134} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {243} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {133} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {242} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {160} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {140} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] {171} signature length 40.40, html5 player en_US-vflXIPlZ4
[youtube] dQw4w9WgXcQ: Downloading DASH manifest
[debug] Invoking downloader on u'https://r12---sn-vgqs7n7z.googlevideo.com/videoplayback?fexp=900720%2C907263%2C916651%2C929305%2C932627%2C933119%2C934954%2C938028%2C9407115%2C9408347%2C9408406%2C9408707%2C9409174%2C942682%2C947233%2C947601%2C948124%2C948703%2C948802%2C951703%2C952612%2C952637%2C957201%2C961404%2C961406&nh=IgpwcjAyLm9yZDEyKgkxMjcuMC4wLjE&key=yt5&gcr=us&dur=212.834&source=youtube&requiressl=yes&ratebypass=yes&itag=18&expire=1429524879&upn=sBiEm59Wnxk&sver=3&mm=31&id=o-AJBkUUKxs3V0S_Q7vLXJWVFUuiC0CClKKG_NlqXwbToY&mv=m&mt=1429503205&ms=au&ip=75.32.12.90&pl=21&initcwndbps=695000&ipbits=0&sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cnh%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&mime=video%2Fmp4&signature=898F6A3963208A382290B512314B28B315CB25EE.84C981582526B6A2498632D6A27F6419B43711E9'
ERROR: unable to open for writing: [Errno 2] No such file or directory: u'D:\\'
Traceback (most recent call last):
  File "youtube_dl\downloader\http.pyo", line 160, in real_download
  File "youtube_dl\utils.pyo", line 248, in sanitize_open
IOError: [Errno 2] No such file or directory: u'D:\\'

If I give a template, it works as expected, but this seems like it shouldn't be necessary when I just want the default:

C:\bin>youtube-dl -o "D:\\%(title)s-%(id)s.%(ext)s" https://www.youtube.com/watch?v=dQw4w9WgXcQ 
[youtube] dQw4w9WgXcQ: Downloading webpage                                                      
[youtube] dQw4w9WgXcQ: Extracting video information                                             
[youtube] dQw4w9WgXcQ: Downloading js player en_US-vflXIPlZ4                                    
[youtube] dQw4w9WgXcQ: Downloading DASH manifest                                                
[download] Destination: D:\Rick Astley - Never Gonna Give You Up-dQw4w9WgXcQ.mp4                
[download] 100% of 16.75MiB in 00:05                                                            

C:\bin>dir /b D:\*.mp4                                                                          
Rick Astley - Never Gonna Give You Up-dQw4w9WgXcQ.mp4                                           
@mitchellmebane mitchellmebane changed the title It should be possible to specify an output directory It should be possible to specify just an output directory Apr 20, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Apr 20, 2015

Duplicate of #5043. (Note that if youtube-dl is in your PATH you can just change the working directory)

@jaimeMF jaimeMF closed this Apr 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.