Update aliases

This commit is contained in:
Michael Campagnaro 2023-08-02 15:11:38 -04:00
parent d7977096a7
commit 62fa34ca20

View File

@ -928,7 +928,7 @@ download_mp4() {
#
# If you need to debug the http request then add "-v trace" to the command above.
#
download_from_m3u8() {
download_mp4_from_m3u8() {
local m3u8_path="$1"
local filename="$2"
@ -948,6 +948,27 @@ download_from_m3u8() {
printf "${BOLD}Finished downloading ${YELLOW}$filename${NORMAL}\n"
}
# Same notes from above regarding cookies/headers.
download_aac_from_m3u8() {
local m3u8_path="$1"
local filename="$2"
if [[ $m3u8_path == "" || $filename == "" ]]; then
error "Usage: <m3u8 path> <filename>"
return
fi
printf "${BOLD}Downloading: ${YELLOW}$filename${NORMAL}\n"
ffmpeg.exe -protocol_whitelist file,https,crypto,tls,tcp -i $m3u8_path -acodec copy "${filename}.aac"
if [[ $? -ne 0 ]]; then
error "Error: failed to download."
return
fi
printf "${BOLD}Finished downloading ${YELLOW}$filename${NORMAL}\n"
}
#-------------------------------------------------
# YouTube Vid DL
@ -1072,7 +1093,8 @@ alias twitter='download_twitter_vid "" '
# Misc
#-------------------------------------------------
alias download-mp4='download_mp4'
alias download-from-m3u8='download_from_m3u8'
alias download-from-m3u8='download_mp4_from_m3u8'
alias download-audio-from-m3u8='download_aac_from_m3u8'
####################################################################################################
# Video Compression