Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wiwikuan authored Aug 24, 2024
1 parent 7ebf117 commit 7f41681
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions yt-res.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7f41681

Please sign in to comment.