Specifying output directory #859

Closed
opened 2026-02-20 23:14:48 -05:00 by deekerman · 2 comments
Owner

Originally created by @oschrenk on GitHub (Jul 27, 2013).

Is it possible to specify an output directory?

I tried the -o option, but it specifies the whole output file template, whereas I only want to specify the output directory but otherwise leaving everything to default.

My usecase is that I want every video to be put into ~/Downloads regardless of my working directory. I tried specifying a template ~/Downloads/%(title)s-%(id)s.%(ext)s and $HOME/Downloads/%(title)s-%(id)s.%(ext)s but bash and environment variables don't get expanded.

Originally created by @oschrenk on GitHub (Jul 27, 2013). Is it possible to specify an output directory? I tried the `-o` option, but it specifies the whole output file template, whereas I only want to specify the output directory but otherwise leaving everything to default. My usecase is that I want every video to be put into `~/Downloads` regardless of my working directory. I tried specifying a template `~/Downloads/%(title)s-%(id)s.%(ext)s` and `$HOME/Downloads/%(title)s-%(id)s.%(ext)s` but bash and environment variables don't get expanded.
Author
Owner

@rg3 commented on GitHub (Jul 27, 2013):

Try something like:

-o "$HOME/Downloads/%(title)s-%(id)s.%(ext)s"

or

-o ~/Downloads/"%(title)s-%(id)s.%(ext)s"

It's a matter of understanding shell quotation marks.

@rg3 commented on GitHub (Jul 27, 2013): Try something like: ``` -o "$HOME/Downloads/%(title)s-%(id)s.%(ext)s" ``` or ``` -o ~/Downloads/"%(title)s-%(id)s.%(ext)s" ``` It's a matter of understanding shell quotation marks.
Author
Owner

@oschrenk commented on GitHub (Jul 27, 2013):

Doesn't work when used in youtube-dl.conf.

OS X 10.8.4

@oschrenk commented on GitHub (Jul 27, 2013): Doesn't work when used in `youtube-dl.conf`. OS X 10.8.4
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl-ytdl-org#859
No description provided.