forked from yt-dlp/yt-dlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
yt-audio-downloader.bat
53 lines (47 loc) · 1.55 KB
/
yt-audio-downloader.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo off
:title
title YouTube Audio Downloader
color 0A
:: Large title section
echo ==================================================
echo YOUTUBE AUDIO DOWNLOADER
echo ==================================================
echo by kokolino75
echo. (Plugin for yt-dlp created by kokolino75)
echo ==================================================
echo.
:start
:: Change color for user prompts - yellow color
color 0E
set /p filename="Enter the desired file name (default is 'audio_output'): "
if "%filename%"=="" set filename=audio_output
echo.
set /p url="Enter the audio URL: "
if "%url%"=="" (
color 0C
echo ERROR: No URL provided. Please enter a valid URL.
echo.
goto start
)
:: Change color for download start message - light green color
color 0A
echo Downloading audio...
:: Attempt to download audio
yt-dlp -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -o "G:\YOTUBE DOUNLOAD MOI\%filename%.mp3" %url%
if errorlevel 1 (
color 0C
echo.
echo ==================================================
echo ERROR: An error occurred during download.
echo Please check the URL and try again.
echo ==================================================
echo.
goto start
)
:: Change color for completion message - blue color
color 09
echo.
echo ==================================================
echo Download completed! Saved as: %filename%.mp3
echo ==================================================
pause