Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Feature request: separate options for output file name and output directory #11311
Comments
|
A simpler idea is: if the output template ends with a slash or a backslash, treat it as a directory and append |
|
@yan12125 this will cause unnecessary confusion - one may expect output template without trailing slashes to be treated as directory. |
|
You're right that's possible. @DarwinAwardWinner's proposal is better |
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like that [x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2016.11.27. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
Description of your issue, suggested solution and other information
I use a youtube-dl.conf file with something like
--output "~/The_Usual_Directory/%(title)s.%(ext)s". However, sometimes, I want to change the output directory to another one while keeping the same file name template. In order to do this, I have to type out--output "~/Some_Other_Directory/%(title)s.%(ext)s", which is annoying because remembering the template part is difficult, and I usually have to copy and paste out of my youtube-dl.conf and then change the path. This would be easier if there were separate options for the file name and destination directory, in which case I could just type something like--outdir ~/Some_Other_Directory. Since obviously the--outputoption is also useful in some cases, I'm not suggesting removing it, but rather providing an alternate way to set it. The semantics of which one takes priority in the case where both are provided would be important, though. It would have to be chosen so that command-line options override the config file, but if--outputis used in the config file and then--outdiris used on the command line, the file name (sans directory path) given in the config file would still be used with the new output directory. So for exampleyoutube-dl --output ~/Dir1/file.mp4 --outdir ~/Dir2should output to~/Dir2/file.mp4.I understand if this is ultimately too complicated to justify the effort, but I think it would be a nice feature to have.