ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.19k stars 10.02k forks source link

add destination folder to batch files #369

Closed siamsites closed 9 months ago

siamsites commented 12 years ago

Hello,

I am using youtube-dl to keep an offline copy of a bunch of channels and playlists. In order to update these, I need to run one job per playlist/channel, because I want them to be in different folders. At the moment I am using a script that runs individual instances of youtube-dl to download/update them one by one.

I would like to use the batch file like this: /media/videos/youtube/PlayList1/ http://www.youtube.com/view_play_list?p=PlayList1 /media/videos/youtube/PlayList2/ http://www.youtube.com/view_play_list?p=PlayList2 /media/videos/youtube/PlayList3/ http://www.youtube.com/view_play_list?p=PlayList3 /media/videos/youtube/Channel1/ ytuser:Channel1 /media/videos/youtube/Channel2/ ytuser:Channel2 /media/videos/youtube/Channel3/ ytuser:Channel3

Then run it like this: "# youtube-dl -citw -a batchfile.txt"

This would make updating channels/playlists much easier ;)

I read somewhere that youtube-dl is wget for youtube... may I make a name suggestion? Rename youtube-dl command to be "yget" or "ytget" or "rg3t"... :)

NeonLightning commented 11 years ago

i'm lookin to do the same thing aswell but also am trying to make it so it makes the folders i tried setting mine to have -o /path/to/vids/folder/%(uploader)s/$(upload_date)s - %(title)s.%(ext)s but it says something about wrong encoding

phihag commented 11 years ago

@NeonLightning Please open a separate issue, and don't forget to include the whole and exact command line you're using. Also, why is there a dollar sign before upload_date?

As to the issue at hand: So you're essentially suggesting a playlist_name placeholder? That's certainly possible. youtube-dl is also curl for youtube, so why not rename it yurl? Basically, youtube-dl is a short name, and contains youtube, so basically everyone can infere (without even knowing wget/curl/aria ...) that it does something with youtube, and hopefully they can decode dl as download. Would you have found youtube-dl if it was named rg3t?

siamsites commented 11 years ago

Yes, a playlist_name placeholder would be great :)

Agree on the naming... youtube-dl is self-explanatory.

jaimeMF commented 11 years ago

@siamsites Since 2013.04.21 you can specify in the output template the playlist name (or id) with %(playlist)s. So you could set your default template to /media/videos/youtube/%(playlist)s/%(title)s-%(id)s.%(ext)s, similar to what you want.