DEV Community

SÃĐrgio AraÚjo
SÃĐrgio AraÚjo

Posted on Edited on

How to listen youtube videos on termux

You need termux installed on your android

Run these commands on your android

pkg install mpv termux-api neovim python pipx
pipx install yturl  
🏆 āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ” ðŸ† āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ”

Note: "pipx — Install and Run Python Applications in Isolated Environments"

Put this code on your ~/.bashrc (android). I was using an aliased neovim on my android, but now I figured out how to make it easier with here documments.

cat <<-'EOF' >> ~/.bashrc
yt(){
    mpv --no-video "$(yturl $(termux-clipboard-get))"
}
EOF
🏆 āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ” ðŸ† āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ”

Now when watching youtube videos you can chose share and get the link, then open your termux and type

yt
🏆 āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ” ðŸ† āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ”

Using pure mpv

mpv --no-video url
🏆 āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ” ðŸ† āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ”

full python support for neovim

pipx install neovim
🏆 āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ” ðŸ† āļĒāļ­āļ”āļ™āļīāļĒāļĄ: voyegr/how to listen youtube videos on termux d - āļŠāļĢāļļāļ›āļ”āļĢāļēāļĄāđˆāļēāļĨāđˆāļēāļŠāļļāļ”

Rererences: https://unix.stackexchange.com/a/229815/3157

Top comments (0)