update-yt-subs.bat

download

see post 888b507c473245958db80201027e93d5

            
@echo off
setlocal disableDelayedExpansion
REM ██████╗ ██████╗ ██╗██╗   ██╗ █████╗  ██████╗██╗   ██╗████████╗ ██████╗ ██████╗  █████╗ ██╗   ██╗
REM ██╔══██╗██╔══██╗██║██║   ██║██╔══██╗██╔════╝╚██╗ ██╔╝╚══██╔══╝██╔═══██╗██╔══██╗██╔══██╗╚██╗ ██╔╝
REM ██████╔╝██████╔╝██║██║   ██║███████║██║      ╚████╔╝    ██║   ██║   ██║██║  ██║███████║ ╚████╔╝ 
REM ██╔═══╝ ██╔══██╗██║╚██╗ ██╔╝██╔══██║██║       ╚██╔╝     ██║   ██║   ██║██║  ██║██╔══██║  ╚██╔╝  
REM ██║     ██║  ██║██║ ╚████╔╝ ██║  ██║╚██████╗   ██║      ██║   ╚██████╔╝██████╔╝██║  ██║   ██║   
REM ╚═╝     ╚═╝  ╚═╝╚═╝  ╚═══╝  ╚═╝  ╚═╝ ╚═════╝   ╚═╝      ╚═╝    ╚═════╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝   
REM @PrivacyToday on Telegram
REM You can stop the current download safely with CTRL+C and resume later. No need to download everything at once.
REM Create a "ytList.txt" in the same folder and enter 1 video/channel/playlist per line.
REM your language
set SUB_LANG="en"
REM maximum height like 480,720,1080 etc
set MAX_HEIGHT="480"
REM ######################################
for /f "tokens=*" %%a in (ytList.txt) do (
    youtube-dl ^
    --write-sub ^
    --sub-lang %SUB_LANG% ^
    -f "bestvideo[height<=?%MAX_HEIGHT%]+bestaudio" ^
    -o "videos/%%(uploader)s/%%(upload_date)s - %%(title)s [%%(resolution)s].%%(ext)s" ^
    --embed-subs ^
    --sub-format ttml ^
    --convert-subs srt ^
    --merge-output-format mkv ^
    --external-downloader aria2c ^
    --external-downloader-args "--file-allocation=prealloc --min-split-size=1M --split=16 --max-connection-per-server=10" ^
    --download-archive "_archive.txt" ^
    --no-check-certificate ^
    "%%a"
)
pause