Hi,
I found a batch script to download video using YouTube-DL in GitHub. I did some modification but unable set the output name.
Batch Script:
OUTPUT part is not working.Code:@ECHO OFF ECHO ====================================================================================================================== ECHO. SET /P URL="[Enter video URL] " ECHO. ECHO ====================================================================================================================== goto formatList :formatList ECHO. ytdlp -F %URL% ECHO. ECHO ====================================================================================================================== goto download :download ECHO. SET /P format="Select format: " ECHO. ECHO ====================================================================================================================== goto output :output ECHO. SET /P OUTPUT="[Enter Title] " ECHO. ECHO ====================================================================================================================== ECHO. ytdlp -o %%(%OUTPUT%)s.%%(ext)s -f %format% --external-downloader aria2c --external-downloader-args "-j 8 -x 8 -s 8" %URL% ECHO. ECHO ====================================================================================================================== ECHO. ECHO Done! PAUSE
Thank you.
+ Reply to Thread
Results 1 to 7 of 7
-
-
What is the original code?
What if you enter g.e. MyWish after the question [Enter Title]? -
This is the original line which I modified with my output version
Code:ytdlp -o %%(title)s.%%(ext)s -f %format% --external-downloader aria2c --external-downloader-args "-j 8 -x 8 -s 8" %URL%
Code::output ECHO. SET /P OUTPUT="[Enter Title] " ECHO. ECHO ====================================================================================================================== ytdlp -o %%(%OUTPUT%)s.%%(ext)s -f %format% --external-downloader aria2c --external-downloader-args "-j 8 -x 8 -s 8" %URL%
-
This is the full original script
Code:@ECHO OFF color 0A ECHO ====================================================================================================================== ECHO. SET /P URL="[Enter video URL] " ECHO. ECHO ====================================================================================================================== goto formatList :formatList ECHO. ytdlp -F %URL% ECHO. ECHO ====================================================================================================================== goto selection :selection ECHO. ECHO 1) Video + Audio ECHO 2) Single format (Audio only / Video only) ECHO. SET /P option="Select option: " if %option% == 1 (goto download) if %option% == 2 (goto downloadSingle) ECHO. ECHO Unknown value ECHO. ECHO ====================================================================================================================== goto selection :download ECHO. SET /P video="Select video format: " SET /P audio="Select audio format: " ECHO. ECHO ====================================================================================================================== ECHO. ytdlp -o %%(title)s.%%(ext)s -f %video%+%audio% -i --ignore-config --hls-prefer-native %URL% ECHO. ECHO ====================================================================================================================== ECHO. ECHO Done! PAUSE EXIT :downloadSingle ECHO. SET /P format="Select format: " ECHO. ECHO ====================================================================================================================== ECHO. ytdlp -o %%(title)s.%%(ext)s -f %format% --external-downloader aria2c --external-downloader-args "-j 8 -x 8 -s 8" %URL% ECHO. ECHO ====================================================================================================================== ECHO. ECHO Done! PAUSE EXIT
-
Similar Threads
-
FFmpeg Batch for Windows
By Eibol in forum Video ConversionReplies: 806Last Post: 18th Jun 2025, 10:01 -
4k TV with lower resolution set trough Windows
By Pav4o in forum Newbie / General discussionsReplies: 16Last Post: 19th Mar 2020, 10:13 -
Avidemux: can't set output aspect ratio to 16:9 (output file is always 4:3)
By blaq in forum Video ConversionReplies: 2Last Post: 10th May 2019, 11:24 -
unable to install huffy codec on windows 7 .. [solved]
By vhelp in forum Newbie / General discussionsReplies: 26Last Post: 9th Jan 2017, 18:22 -
windows batch: paste but don't execute command in Windows command prompt
By flashandpan007 in forum ProgrammingReplies: 17Last Post: 22nd Jun 2016, 23:12