Last active
April 5, 2020 16:55
-
-
Save J-Broadway/a50d952b0f8458c4aa02f7881d65656b to your computer and use it in GitHub Desktop.
youtube-dl batch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
::Change directory below to point to your youtube-dl folder | |
cd "C:\Users\%USERNAME%\Downloads\youtube-dl" | |
setlocal EnableDelayedExpansion | |
set "input=" | |
set "p-start=" | |
set "p-end=" | |
::Download media as wav if -a flag is used | |
IF "%1"=="-a" ( | |
set /p input=Media URL: | |
youtube-dl -x --audio-format wav !input! | |
exit /b | |
) | |
::Download playlist from start to end as wav if -p flag is used | |
IF "%1"=="-p" ( | |
set /p input=Media URL: | |
set /p p-start=Playlist-Start: | |
set /p p-end=Playlist-End: | |
youtube-dl -x --audio-format wav --playlist-start !p-start! --playlist-end !p-end! !input! | |
exit /b | |
) | |
::If -a flag isn't used execute youtube-dl and pass all arguments | |
youtube-dl %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove output | |
-o '%(title)s.%(ext)s' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment