-
Notifications
You must be signed in to change notification settings - Fork 3
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
6 additions
and
6 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 |
---|---|---|
@@ -1,33 +1,33 @@ | ||
ARGS_ALL="--no-warnings --windows-filenames --output '%(title)s.%(ext)s'" | ||
ARGS_BACTH="$AR--download-archive .downloaded.txt --no-playlist" | ||
|
||
function yt_dlp_sub_en() { | ||
function yt_dlp_sub_en_url() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <url to video>"} | ||
local url=${1%%&*} # remove all after & (to leave only www.youtube.com/watch?v=...) | ||
yt-dlp $ARGS_ALL --skip-download --write-sub --write-auto-sub --convert-subs srt --sub-lang en "$url" | ||
} | ||
|
||
function yt_dlp_audio() { | ||
function yt_dlp_audio_from_url_or_list_url() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <url to audio or list>"} | ||
yt-dlp $ARGS_ALL --extract-audio --audio-format m4a "$1" | ||
} | ||
|
||
function yt_dlp_audio_from_txt() { | ||
function yt_dlp_audio_from_urls_at_txt() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <url to audio or list>"} | ||
yt-dlp $ARGS_ALL $ARGS_BACTH --extract-audio --audio-format m4a --batch-file "$1" | ||
} | ||
|
||
function yt_dlp_video_from_txt() { | ||
function yt_dlp_video_from_urls_at_txt() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <url to audio or list>"} | ||
yt-dlp $ARGS_ALL $ARGS_BACTH --recode-video mp4 --batch-file "$1" | ||
} | ||
|
||
function yt_dlp_video_480() { | ||
function yt_dlp_video_480_from_url_or_list_url() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <url to video or list>"} | ||
yt-dlp $ARGS_ALL -f 'best[height<=480]' --recode-video mp4 "$1" | ||
} | ||
|
||
function yt_dlp_video_480_from_txt() { | ||
function yt_dlp_video_480_from_urls_at_txt() { | ||
: ${1?"Usage: ${FUNCNAME[0]} <txt_file>"} | ||
yt-dlp $ARGS_ALL $ARGS_BACTH -f 'best[height<=480]' --recode-video mp4 --batch-file "$1" | ||
} |