Skip to content

Instantly share code, notes, and snippets.

@erickyun
Last active February 7, 2022 14:57
Show Gist options
  • Save erickyun/207f2c6254698f060370911c92e39d9c to your computer and use it in GitHub Desktop.
Save erickyun/207f2c6254698f060370911c92e39d9c to your computer and use it in GitHub Desktop.
Download only part of a youtube video
@ECHO OFF
color 0A
ECHO ======================================================================================================================
ECHO.
SET /P vURL="[Enter video URL] "
ECHO.
SET /P StartTime="[Enter Start Time] "
SET /P EndTime="[Enter End Time] "
ECHO.
ECHO ======================================================================================================================
ECHO.
yt-dlp "%vURL%" -o "Downloads/%%(title)s.%%(ext)s" --no-config --downloader ffmpeg --external-downloader-args "ffmpeg_i:-ss "%StartTime%" -to "%EndTime%" -shortest -y"
ECHO.
ECHO Done!
PAUSE
EXIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment