Skip to content

Instantly share code, notes, and snippets.

@kairusds
Last active October 19, 2022 19:46
Show Gist options
  • Save kairusds/ce6267a073dd9f8d34c99db5b94414e8 to your computer and use it in GitHub Desktop.
Save kairusds/ce6267a073dd9f8d34c99db5b94414e8 to your computer and use it in GitHub Desktop.
Alias command for downloading files or the best quality of a video's audio into mp3 with yt-dlp
#!/bin/sh
if [ $# -eq 0 ]; then
echo "Usage: aget <url>"
exit 1
fi
aria2c -j 16 -s 16 -x 16 -k 1M "$1"
apt install wget ffmpeg aria2 python3 ; aget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp ; chmod +x yt-dlp ; mv yt-dlp ~/../usr/bin/ ; apt autoremove ndk-sysroot
#!/bin/sh
if [ $# -eq 0 ]; then
echo "Usage: ytmp3 <video url>"
exit 1
fi
yt-dlp -f bestaudio --ignore-errors --extract-audio --audio-format mp3 -o "%(uploader)s - %(title)s.%(ext)s" --audio-quality 0 "$1" --download-archive archive.txt --external-downloader aria2c --external-downloader-args "-j 16 -s 16 -x 16 -k 1M"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment