Running youtube-dl on Android via Termux
By chimo on (updated on )I recently got youtube-dl working on LineageOS nightly via Termux. Here are the steps I took:
- In Termux, install some of the tools we’ll need:
packages install python wget vim
- Create a “bin” folder in the home directory:
mkdir bin
- Add the directory to your path at login:
vim .bashrc
export PATH=$PATH:~/bin - Exit and re-launch Termux to update your path:
exit
- Download youtube-dl:
wget https://yt-dl.org/downloads/latest/youtube-dl -O bin/youtube-dl
- Make it executable:
chmod u+x bin/youtube-dl
- Change the interpreter path in the youtube-dl file:
vim -b bin/youtube-dl
#!/data/data/com.termux/files/usr/bin/env python - Try it!
youtube-dl [URL]