Last active
August 25, 2024 05:25
-
-
Save xuyuji9000/0b850c17b8c8b7439eced27a5b194524 to your computer and use it in GitHub Desktop.
This gist documents a list of examples of yt-dlp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist documents a list of examples of using `yt-dlp` command | |
# to download video assets from the YouTube platform | |
VIDEO_URL="https://www.youtube.com/watch?v=9tU3-WSyEhA" | |
# List available format | |
yt-dlp -F "${VIDEO_URL}" | |
# Download specific format | |
# 140: mp4a | |
# 399: 1080p mp4 | |
FORMAT_CODE='' | |
yt-dlp \ | |
-f "${FORMAT_CODE}" \ | |
"${VIDEO_URL}" | |
# Merge video and audio | |
VIDEO="" | |
AUDIO="" | |
ffmpeg \ | |
-i "${VIDEO}" \ | |
-i "${AUDIO}" \ | |
-c copy output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment