-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
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
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 |