DEV Community

Sérgio Araújo
Sérgio Araújo

Posted on • Edited on

5

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  
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

yt
Enter fullscreen mode Exit fullscreen mode

Using pure mpv

mpv --no-video url
Enter fullscreen mode Exit fullscreen mode

full python support for neovim

pipx install neovim
Enter fullscreen mode Exit fullscreen mode

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

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay