Skip to content

Instantly share code, notes, and snippets.

@Vendicated
Last active November 5, 2022 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vendicated/63efda0ad96f707a3ba290f1aa2e8a86 to your computer and use it in GitHub Desktop.
Save Vendicated/63efda0ad96f707a3ba290f1aa2e8a86 to your computer and use it in GitHub Desktop.
Set up yt-dlp in termux, allowing you to share any video to termux with the Android share menu to download it
curl https://gist.githubusercontent.com/Vendicated/63efda0ad96f707a3ba290f1aa2e8a86/raw/termux-ytdl.sh | sh -
#!/bin/sh
# Enable storage access for termux
termux-setup-storage
# Update packages and install python and yt-dlp
pkg update && pkg upgrade
pkg install python
pip3 install yt-dlp
# install script
mkdir -p bin
cat > bin/termux-url-opener << 'UWU'
#!/bin/sh
printf "Enter Name\n> "
read -r name
yt-dlp "$1" -o "/sdcard/Movies/${name:-%(name)s}.%(ext)s"
UWU
chmod +x bin/termux-url-opener
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment