79129239

Date: 2024-10-26 18:44:04
Score: 0.5
Natty:
Report link
# updated for current versions 
# yt-dlp version 2024.10.22 and 
# ffmpeg #version 7.1

# Prereqs use PS or CMD to Install.
# winget yt-dlp
# winget ffmpeg


# Define URL and time ranges.
$URL = "https://www.youtube.com/watch?v=05j8Ai9riEM&list=PPSV" 
$from = "00:00:00"
$duration = "00:02:14"

# Download and merge video and audio into 'full_video.mkv'.
yt-dlp -f bestvideo+bestaudio --merge-output-format mkv -o 
"full_video.mkv" $URL

# Use FFmpeg to extract the specific portion of the video. 
ffmpeg -i "full_video.mkv" -ss $from -t $duration -c copy output.mkv
Reasons:
  • Blacklisted phrase (1): youtube.com
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: William Foster