Skip to content

Instantly share code, notes, and snippets.

@Albirew
Created August 16, 2023 11:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Albirew/43f718a618eb4ff2f2801f4a77ca6a8e to your computer and use it in GitHub Desktop.
Save Albirew/43f718a618eb4ff2f2801f4a77ca6a8e to your computer and use it in GitHub Desktop.
some scripts for yt-dlp
@echo off
set savepath=%userprofile%\Desktop
:: download provided URLs in both video and audio format
set binpath=%~dp0
cd %savepath%
echo Usage: yt-dlp.exe [OPTIONS] URL [URL...]
echo --geo-bypass-country CODE Force bypass geographic restriction with ISO 3166-2 country code
echo.
set /P command=Enter options and video URL:
if ["%command%"] == [""] exit 0
echo.
echo $^>yt-dlp -x -k -f b --audio-format mp3 --write-sub --sub-lang fr,en --yes-playlist --geo-bypass %command%
"%binpath%\yt-dlp.exe" -x -k -f b --audio-format mp3 --write-sub --sub-lang fr,en --yes-playlist --geo-bypass %command%
IF %ERRORLEVEL% NEQ 0 pause
@echo off
set savepath=%userprofile%\Desktop
:: download provided URLs in audio format only
set binpath=%~dp0
cd %savepath%
echo Usage: yt-dlp.exe [OPTIONS] URL [URL...]
echo --geo-bypass-country CODE Force bypass geographic restriction with ISO 3166-2 country code
echo.
set /P command=Enter options and video URL:
if ["%command%"] == [""] exit 0
echo.
echo $^>yt-dlp --extract-audio --audio-format mp3 --geo-bypass %command%
"%binpath%\yt-dlp.exe" --extract-audio --audio-format mp3 --geo-bypass %command%
IF %ERRORLEVEL% NEQ 0 pause
@echo off
:: updates yt-dlp to latest version
set binpath=%~dp0
echo $^>yt-dlp --update
"%binpath%\yt-dlp.exe" --update
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment