Modern Android has been locking down access to everything that isn't an NDK public API.
https://developer.android.com/ndk/guides/stable_apis
Given the changes started with Android 7 to block access to everything else?
In fact, https://wiki.termux.com/wiki/Differences_from_Linux
It's quicker than any of the YouTube downloader apps I've tried!
How it works: in ~/bin there's a termux-url-opener script that handles what you share:
"#!/bin/bash
case "$1" in
*youtu*)
echo "$1 is a YouTube URL,
downloading"
sh ~/shortcuts/dl_yt.sh $1
..."
(dl_yt just calls youtube-dl -x)I love it and am still finding new uses for Termux. I've got neovim and all my dotfiles loaded, so in a pinch I can ssh into my phone to do some work.
youtube-dl -f bestaudio -x --no-progress -o "~/storage/music/YouTube/%(title)s.%(ext)s" "$1"
This generally gives me .opus files, which play OK but my player can't change the tags.