Handmade Hero » Forums » Code » Downloading youtube videos from win32 command line
mmozeiko
Mārtiņš Možeiko
1440 posts
1 project
#5380 Downloading youtube videos from win32 command line
1 year, 8 months ago

If you can get them online, I'll share them using BitTorrent Sync. I could set up sftp server for you, if you need place where to put files. If your upload speed is not great, maybe we can do it differently - I could send you flash card by mail, you write everything to and send it back, and I'll put everything up in BTSync.

Let me know if you want to do this, send me an e-mail to [email protected]

As for those big files - you can easily cut off prestream from latest files. ffmpeg can do that without re-encoding: "ffmpeg -i input.mp4 -c copy -t 00:35:00.0 output.mp4" - that would copy only first 35 minutes. Only you'll need a bit of work here to find the time when prestream ends for each file.
mattheweston
Matt
4 posts
This newly registered member has not yet activated their account.
#11642 Downloading youtube videos from win32 command line
4 months, 2 weeks ago

Does anyone have a script that will download just audio ?
mmozeiko
Mārtiņš Možeiko
1440 posts
1 project
#11643 Downloading youtube videos from win32 command line
4 months, 2 weeks ago

youtube-dl will do that.
For example, to download AAC audio run:
1
youtube-dl -f 140 https://www.youtube.com/watch?v=xxx


Run youtube-dl -F https://... if you want to see other possible formats.
mattheweston
Matt
4 posts
This newly registered member has not yet activated their account.
#11654 Downloading youtube videos from win32 command line
4 months, 2 weeks ago

Thank you for your help. I may have overlooked it in the help file, but is there a parameter I can pass to download the files to a specific directory?
mmozeiko
Mārtiņš Možeiko
1440 posts
1 project
#11655 Downloading youtube videos from win32 command line
4 months, 2 weeks ago

It downloads to current folder. So simply "cd" to folder you want and then run youtube-dl.
mrmixer
Simon Anciaux
244 posts
#11656 Downloading youtube videos from win32 command line
4 months, 2 weeks ago

I don't remember the details but you can use -o FORMAT to output to a specific directory. Something like that:
1
youtube-dl.exe -o C:\some\directory\%%(title)s.%%(ext)s youtube_address