Skip to content

Commit

Permalink
yt alias
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Mar 14, 2024
1 parent a8bc865 commit 7c4d799
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ fi
## Watch any youtube/invidious video URL (or any URL yt-dlp supports) at the highest quality:
## Can read URL input directly if the argument is left blank (incognito mode)
## (Sometimes yt doesn't work, so use yt-720 as a backup)
yt() {
STREAM=$1; [[ "$STREAM" == "" ]] && read -e -p "Enter stream: " STREAM
yt-dlp -f bestvideo+bestaudio "$STREAM" -o - | mpv - --fs -force-seekable=yes
}
#### Old version:
# yt() {
# STREAM=$1; [[ "$STREAM" == "" ]] && read -e -p "Enter stream: " STREAM
# yt-dlp -f bestvideo+bestaudio "$STREAM" -o - | mpv - --fs -force-seekable=yes
# }
#### New version: mpv can run use yt-dlp all by itself, just pass the URL:
alias yt=mpv

## Watch youtube/invidious video URL (or any URL yt-dlp supports)
## Uses a medium quality pre-muxed stream (its usually about 720p).
## Can read URL input directly if the argument is left blank (incognito mode)
Expand Down

0 comments on commit 7c4d799

Please sign in to comment.