Created
December 6, 2023 14:19
-
-
Save cirrusUK/3ba2e193e4ac742c0ee4d8743fcd53d1 to your computer and use it in GitHub Desktop.
Battch file for yt-dlp : handy for the 'open with'' browser extension for kwik video,audio downloads
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 | |
SET DnBest=--hls-prefer-native --add-metadata -f best | |
SET DnBestAudVid=--hls-prefer-native --add-metadata | |
SET DnBestUnmerge=--hls-prefer-native --add-metadata -f "bestvideo,bestaudio" | |
SET DnBestMP4_MPA=--hls-prefer-native --add-metadata -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" | |
SET DnBestMP4_AAC=--hls-prefer-native --add-metadata -f "bestvideo[ext=mp4]+bestaudio[ext=aac]/best[ext=mp4]/best" | |
SET DnMP3=--write-all-thumbnails --hls-prefer-native --add-metadata --embed-thumbnail -f bestaudio/best -x --audio-quality 1 --audio-format mp3 | |
SET DnAAC=--write-all-thumbnails --hls-prefer-native --add-metadata --embed-thumbnail -f bestaudio/best -x --audio-quality 1 --audio-format aac | |
SET DnM4A=--write-all-thumbnails --hls-prefer-native --add-metadata --embed-thumbnail -f bestaudio/best -x --audio-quality 1 --audio-format m4a | |
SET Destination=""C:\Users\user\dwhelper"/%%(title)s.%%(ext)s" | |
if not -%1-==-- SET URL=%* | |
if -%1-==-- goto fopNew | |
:top | |
CLS | |
ECHO . | |
ECHO ---------------------- | |
ECHO Cirrus-Minor #Archlinux | |
ECHO ---------------------- | |
ECHO URL: %URL% | |
ECHO ---------------------- | |
ECHO Available operations: | |
ECHO ---------------------- | |
ECHO . | |
::This prints the list of the operations | |
ECHO 1. Best already on site | |
ECHO 2. Best Audio and Best Video | |
ECHO 3. Best (no merge) | |
ECHO 4. Best MP4 and M4A | |
ECHO 5. Best MP4 and AAC | |
ECHO 6. MP3 (Audio) | |
ECHO 7. AAC (Audio) | |
ECHO 8. M4A (Audio) | |
ECHO - | |
ECHO f. List all possible formats | |
ECHO u. Auto-update | |
ECHO n. Process New File | |
ECHO x. Quit | |
ECHO - | |
::Ask the user to choose the operation they want | |
SET /P operation=Which operation would you like to do?: | |
if "%operation%"=="n" goto fopNew | |
if "%operation%"=="N" goto fopNew | |
if "%operation%"=="1" goto fop1 | |
if "%operation%"=="2" goto fop2 | |
if "%operation%"=="3" goto fop3 | |
if "%operation%"=="4" goto fop4 | |
if "%operation%"=="5" goto fop5 | |
if "%operation%"=="6" goto fop6 | |
if "%operation%"=="7" goto fop7 | |
if "%operation%"=="8" goto fop8 | |
if "%operation%"=="f" goto fopFormat | |
if "%operation%"=="F" goto fopFormat | |
if "%operation%"=="u" goto fopUpdate | |
if "%operation%"=="U" goto fopUpdate | |
goto fopQuit | |
:fop1 | |
ECHO Best: | |
yt-dlp.exe %DnBest% -o %Destination% %URL% | |
pause | |
goto top | |
:fop2 | |
ECHO Best Audio and Best Video: | |
yt-dlp.exe %DnBestAudVid% -o %Destination% %URL% | |
pause | |
goto top | |
:fop3 | |
ECHO Best No Merge: | |
yt-dlp.exe %DnBestUnmerge% -o %Destination% %URL% | |
pause | |
goto top | |
:fop4 | |
ECHO Best MP4 and MPa: | |
yt-dlp.exe %DnBestMP4_MPA% -o %Destination% %URL% | |
pause | |
goto top | |
:fop5 | |
ECHO Best MP4 and AAC: | |
yt-dlp.exe %DnBestMP4_AAC% -o %Destination% %URL% | |
pause | |
goto top | |
:fop6 | |
ECHO MP3: | |
yt-dlp.exe %DnMP3% -o %Destination% %URL% | |
pause | |
goto top | |
:fop7 | |
ECHO AAC: | |
yt-dlp.exe %DnAAC% -o %Destination% %URL% | |
pause | |
goto top | |
:fop8 | |
ECHO M4A: | |
yt-dlp.exe %DnM4A% -o %Destination% %URL% | |
pause | |
goto top | |
:fopFormat | |
ECHO List of all possible formats: | |
yt-dlp.exe -F %URL% | |
pause | |
goto top | |
:fopUpdate | |
ECHO Updates: | |
yt-dlp.exe -U | |
pause | |
goto top | |
:fopNew | |
SET /P URL=Please enter the video URL: | |
goto top | |
:fopQuit | |
click click2 | |
Quote Quote | |
13th Jul 2022 14:36 #9 | |
creakndale | |
creakndale is offline | |
Member | |
Sep 2006 | |
United States | |
Search Comp PM | |
[ss]vegeta, | |
Works great. Thank you so much !! | |
creakndale | |
Quote Quote | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment