Skip to content

Instantly share code, notes, and snippets.

@donnaken15
Created August 4, 2025 07:21
Show Gist options
  • Select an option

  • Save donnaken15/a1980eee19977727e2a6e3e871c51d0a to your computer and use it in GitHub Desktop.

Select an option

Save donnaken15/a1980eee19977727e2a6e3e871c51d0a to your computer and use it in GitHub Desktop.
download and label clipped section of a video, with some allowance for extra arguments (screw memorizing the parameter)
@echo off
chcp 65001
:: %1 == id, %2 == start, %3 == end, %4 %5 %6 %7 %8 %9 additional arguments
if [%3]==[] exit /b 1
set "URL=%~1" & set "START=%~2" & set "END=%~3"
shift & shift & shift
python -m yt_dlp --download-sections "*%START%-%END%" -o "%%(title)s {%START::=:%–%END::=:%} [%%(id)s].%%(ext)s" %1 %2 %3 %4 %5 %6 %7 %8 %9 -- "%URL%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment