Add files via upload

This commit is contained in:
Wiwi Kuan
2024-08-24 20:16:17 +08:00
committed by GitHub
parent 7ebf117a7e
commit 7f41681bd7

16
yt-res.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
# Check if two arguments are provided.
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <resolution> <url>"
exit 1
fi
# Define the resolution to be used in the download.
resolution=$1
# Define the URL from which the video should be downloaded.
url=$2
# Use yt-dlp to download a video with the specified resolution.
yt-dlp -f "bestvideo[height<=${resolution}]+bestaudio/best[height<=${resolution}]" $url