echo"See configurable env variables in the script"
echo"This will produce an MP4 muxed file called res.mp4 in the working directory"
echo"Requirements: ffmpeg yt-dlp whisper"
echo"Whisper needs to be built into the main binary with make, then you can rename it to something like 'whisper' and add it to your PATH for convenience."
echo"E.g. in the root of Whisper.cpp, run: 'make && cp ./main /usr/local/bin/whisper'"
}
check_requirements(){
if ! command -v ffmpeg &>/dev/null;then
echo"ffmpeg is required (https://ffmpeg.org)."
exit1
fi
if ! command -v yt-dlp &>/dev/null;then
echo"yt-dlp is required (https://github.com/yt-dlp/yt-dlp)."
exit1
fi
if ! command -v "$WHISPER_EXECUTABLE"&>/dev/null;then
WHISPER_EXECUTABLE="./main"
if ! command -v "$WHISPER_EXECUTABLE"&>/dev/null;then
echo"Whisper is required (https://github.com/ggerganov/whisper.cpp)."
exit1
fi
fi
}
if[[$# -lt 1]];then
print_help
exit1
fi
if[["$1"=="help"]];then
print_help
exit0
fi
temp_dir="tmp"
source_url="$1"
check_requirements
msg "Downloading VOD..."
# Optionally add --cookies-from-browser BROWSER[+KEYRING][:PROFILE][::CONTAINER] for members only VODs